blob: a7d9beb752c6efbb45235149a516b08546e45350 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#!/bin/sh
#
# This file is laid down by puppet as part of the genomerepo::appliance class
# that ships with the genome-repo RPM.
update_working_dir() {
GIT_DIR=`pwd`
GIT_WORK_TREE="/etc/puppet/modules/main/`/bin/basename $GIT_DIR`"
pushd $GIT_WORK_TREE
git --git-dir=$GIT_DIR reset --hard $1
echo "$GIT_WORK_TREE updated."
popd
}
while read oldrev newrev ref; do
# We only care when master gets updated
if [[ $ref == 'refs/heads/master' ]]
then
update_working_dir $newrev
fi
done
|