Skip to content

Commit fdb6e7a

Browse files
committed
chore: adding convenience script to new utility dir
* creates a new directory for utilities * adds the currently-in-use copy of pull-all-repos-in-directory.sh that is currently only shared via the hosted devstack AMI FIXES: APER-3925
1 parent 2960ad3 commit fdb6e7a

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
#!/bin/bash
2+
3+
################
4+
5+
sync_directory() {
6+
IFS=$'\n'
7+
8+
for REPO in `ls "$1/"`
9+
do
10+
if [ -d "$1/$REPO" ]
11+
then
12+
echo "Updating $1/$REPO at `date`"
13+
if [ -d "$1/$REPO/.git" ]
14+
then
15+
git -C "$1/$REPO" pull
16+
else
17+
sync_directory "$1/$REPO"
18+
fi
19+
echo "Done at `date`"
20+
fi
21+
done
22+
}
23+
24+
REPOSITORIES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
25+
26+
sync_directory $REPOSITORIES
27+

0 commit comments

Comments
 (0)