diff options
Diffstat (limited to 'adei/scripts/adei-branch.sh')
-rwxr-xr-x | adei/scripts/adei-branch.sh | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/adei/scripts/adei-branch.sh b/adei/scripts/adei-branch.sh index 6fa8db2..5f14c01 100755 --- a/adei/scripts/adei-branch.sh +++ b/adei/scripts/adei-branch.sh @@ -10,8 +10,12 @@ if [ ! -d /adei/src -o ! -d /adei/tmp -o ! -d /adei/sys -o ! -d /adei/cfg ]; th exit 1 fi +LOCK_FILE=.lock +( + flock -x 10 + flock -x 11 -if [ ! -f /adei/src/VERSION ]; then + if [ ! -f /adei/src/VERSION ]; then bzr branch -r $ADEI_REVISION --use-existing-dir http://darksoft.org/bzr/adei/trunk/ /adei/src ( cd /adei/src @@ -33,9 +37,9 @@ if [ ! -f /adei/src/VERSION ]; then ln -s ../cfg/config.actual.php config.actual.php ln -s ../cfg/config.override.php config.override.php ) -fi + fi -( + ( cd /adei/src for setup in $ADEI_ENABLED_SETUPS $ADEI_SETUP; do if [[ ! -a setups/$setup ]]; then @@ -48,4 +52,5 @@ fi ln -s ../../cfg/$setup setups/$setup fi done -) + ) +) 10> /adei/cfg/$LOCK_FILE 11> /adei/src/$LOCK_FILE |