Unverified Commit 5add3079 authored by boklm's avatar boklm
Browse files

Bug 40045: Add lock on tools/tb-build-01-start-nightly-build

parent 1b043d61
#!/bin/bash #!/bin/bash
set -e set -e
function getlock {
lockfile=/run/lock/tb-build-01-start-nightly-build.lock
if test -f $lockfile
then
old_pid=$(cat $lockfile)
if test -z "$old_pid" || ! test -d "/proc/$old_pid"
then
echo "Removing old lockfile: $lockfile"
rm -f $lockfile
else
echo "Script already running. Exiting." 1>&2
exit 0
fi
fi
echo $$ > $lockfile
trap "rm -f $lockfile" EXIT
}
getlock
today_version=$(date '+tbb-nightly.%Y.%m.%d') today_version=$(date '+tbb-nightly.%Y.%m.%d')
cd /home/tb-builder/tor-browser-bundle-testsuite cd /home/tb-builder/tor-browser-bundle-testsuite
......
Supports Markdown
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