forked from openstack-charmers/release-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_update-requirements
executable file
·33 lines (30 loc) · 1.04 KB
/
_update-requirements
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
30
31
32
33
#!/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="$(cat charms.txt)"
for charm in $charms; do
if [ ! -d charms/$charm ]; then
echo "Use ./get-charms master to clone the charm dirs first ($charm not found)"
exit 1
fi
done
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/
;;
*)
echo "UNKNOWN TYPE" && exit 1
;;
esac
)
done