Skip to content

Commit 98d1dc9

Browse files
MythicLionManadamtharani
authored andcommitted
Backed out the acquire lock hack in the dependencies script (again).
Somehow this got resurrected during all of the repo changes.
1 parent 61006d6 commit 98d1dc9

File tree

3 files changed

+0
-30
lines changed

3 files changed

+0
-30
lines changed

scripts/get-ios.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ popd > /dev/null
66

77
. "$scriptpath/include.sh/build-dep.sh"
88

9-
acquire_lock "$0.lock"
10-
119
deps="ctemplate-ios libetpan-ios tidy-html5-ios"
1210
for dep in $deps ; do
1311
name="$dep"

scripts/get-mac.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ popd > /dev/null
66

77
. "$scriptpath/include.sh/build-dep.sh"
88

9-
acquire_lock "$0.lock"
10-
119
deps="ctemplate-osx libetpan-osx"
1210
for dep in $deps ; do
1311
name="$dep"

scripts/include.sh/build-dep.sh

Lines changed: 0 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,5 @@
11
#!/bin/sh
22

3-
# Aquires an exclusive lock for the execation of the script. The only (reqruired)
4-
# parameter is the path to the lockfile to use. Only one script can run using the
5-
# same lockfile path. The lock will be released automatically when the script
6-
# terminates. If another process has the lock then the caller will block until
7-
# they release it. This function should only be called once per script.
8-
acquire_lock()
9-
{
10-
# Store lockfile in a global variable, otherwise it won't be defined when the
11-
# cleanup hook is called
12-
lockfile="$1"
13-
while :
14-
do
15-
if mkdir "$lockfile" 2>/dev/null; then
16-
echo "Lock $lockfile acquired"
17-
18-
# Remove lockdir when the script finishes, or when it receives a signal
19-
trap 'rm -rf "$lockfile"' EXIT
20-
break
21-
else
22-
# Yes, this is as gross as it looks
23-
echo "Another process has the lock $lockfile, waiting…"
24-
sleep 1
25-
fi
26-
done
27-
}
28-
293
build_git_ios()
304
{
315
if test "x$name" = x ; then

0 commit comments

Comments
 (0)