forked from letoram/arcan
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Makes external/git/clone.sh POSIX shell compatible (letoram#261)
FossilOrigin-Name: d2da2c2dd05d2acb0c33c4dcf184bb71fe7a927745e615e649f68ab3b43f47a7
- Loading branch information
Showing
1 changed file
with
11 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,22 @@ | ||
#!/bin/bash | ||
#!/bin/sh | ||
|
||
# solution plucked from http://stackoverflow.com/questions/59895 | ||
SOURCE="${BASH_SOURCE[0]}" | ||
SOURCE="$0" | ||
while [ -h "$SOURCE" ]; do | ||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
SOURCE="$(readlink "$SOURCE")" | ||
[[ $SOURCE != /* ]] && SOURCE="$DIR/$SOURCE" | ||
case $SOURCE in | ||
"/"*) true ;; | ||
*) SOURCE="$DIR/$SOURCE" ;; | ||
esac | ||
done | ||
DIR="$( cd -P "$( dirname "$SOURCE" )" && pwd )" | ||
|
||
if [ ! -f "$DIR/clone.sh" ] || [ -h "$DIR/clone.sh" ]; then | ||
>&2 echo 'Could not resolve source directory, make sure to execute the source file instead of sourcing it' | ||
exit 1 | ||
fi | ||
|
||
git clone http://luajit.org/git/luajit-2.0.git "$DIR/luajit" | ||
git clone https://github.com/letoram/openal.git "$DIR/openal" | ||
git clone https://github.com/libuvc/libuvc.git "$DIR/libuvc" |