-
Notifications
You must be signed in to change notification settings - Fork 20
Expand file tree
/
Copy path_update-requirements
More file actions
executable file
·29 lines (27 loc) · 1014 Bytes
/
_update-requirements
File metadata and controls
executable file
·29 lines (27 loc) · 1014 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#!/bin/bash -e
# Update *requiremments.txt files from global/*. Assumes git clones have already
# been performed. Does not commit, push, or submit/review.
# See `batch-example` for usage as a batch of charm updates.
charms=$(cd charms && ls -d1 *)
for charm in $charms; do
charm_type="$(./what-is charms/$charm)"
echo "===== $charm ($charm_type) ====="
(
# Systematically copy *requirements.txt files into repos
case $charm_type in
source-zaza)
cp -fvp global/$charm_type/src/*requirements.txt charms/$charm/src/
cp -fvp global/$charm_type/*requirements.txt charms/$charm/
;;
classic-zaza)
cp -fvp global/$charm_type/*requirements.txt charms/$charm/
;;
ops-unknown)
cp -fvp global/$charm_type/*requirements.txt charms/$charm/
;;
*)
echo "UNKNOWN TYPE" && exit 1
;;
esac
)
done