Commit 39ff5e3e authored by Son Nguyen's avatar Son Nguyen

Update the language scripts to prevent parallel running

Change-Id: I10a3a7a0e637b7080219a6f0b4090e1b664bc94f
parent 4733b2fa
......@@ -37,5 +37,12 @@ fi
[ ! -d ${CLEAN} ] && mkdir ${CLEAN}
[ ! -d ${TARBALLS} ] && mkdir ${TARBALLS}
# Lock the script to prevent running in parallel
if [ ! mkdir ${DATA}/lock ]; then
echo "The script is running" >&2
exit 0
fi
env DATA=$DATA DOCROOT=$DOCROOT SCRIPTS=$SCRIPTS /usr/bin/perl ${SCRIPTS}/langpacks.pl
rm -rf ${DATA}/lock
......@@ -18,6 +18,12 @@ if [ ! -w ${DOCROOT} ]; then
exit 1
fi
# Lock the script to prevent running in parallel
if [ ! mkdir ${DATA}/lock ]; then
echo "The script is running" >&2
exit 0
fi
WORK=${DATA}/templates
GITDIR=${WORK}/git
TEMP=${WORK}/temp
......@@ -181,3 +187,6 @@ for branch in ${branches} ; do
echo "${remotecommit}" > ${last}
fi
done
# Unlock the script
rm -rf ${DATA}/lock
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment