summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2015-01-03 10:59:47 +0100
committerGubolin <gubolin@fantasymail.de>2015-01-03 10:59:47 +0100
commit45033e2101a5d5d0929dd28205f3177059ad865d (patch)
treec90f4527ea94f6fbf211db10f95695a32380dc10
parent89b1bdb53ff49148f7757a932bfd393b9248fd2c (diff)
downloadsnap-45033e2101a5d5d0929dd28205f3177059ad865d.tar.gz
snap-45033e2101a5d5d0929dd28205f3177059ad865d.zip
allow setting the Snap! source in a variable
-rwxr-xr-xbinary.sh7
-rwxr-xr-xdesktop.sh7
-rwxr-xr-xmobile.sh7
3 files changed, 18 insertions, 3 deletions
diff --git a/binary.sh b/binary.sh
index 6f267d0..c1a481e 100755
--- a/binary.sh
+++ b/binary.sh
@@ -1,5 +1,10 @@
#!/bin/bash
+if [[ "$snapsource" == "" ]]
+then
+ export snapsource="https://github.com/Gubolin/snap.git"
+fi
+
if [[ $# < 2 ]]
then
echo "Usage: binary.sh OPTION PLATFORM [FILE]"
@@ -42,7 +47,7 @@ then
fi
buildsource=$(mktemp -d)
-git clone "https://github.com/Gubolin/snap.git" $buildsource
+git clone $snapsource $buildsource
cd "$buildsource"
git checkout mobileapp
diff --git a/desktop.sh b/desktop.sh
index 8b0e21c..53ec24b 100755
--- a/desktop.sh
+++ b/desktop.sh
@@ -1,5 +1,10 @@
#!/bin/bash
+if [[ "$snapsource" == "" ]]
+then
+ export snapsource="https://github.com/Gubolin/snap.git"
+fi
+
if [[ $1 = "" ]]
then
echo "Usage: desktop.sh PLATFORM [BUILDSOURCE]"
@@ -16,7 +21,7 @@ builddir=$(mktemp -d)
if [[ $2 == "" ]]
then
- git clone https://github.com/Gubolin/snap.git $builddir
+ git clone "$snapsource" $builddir
cd $builddir/
git checkout mobileapp
else
diff --git a/mobile.sh b/mobile.sh
index b0bcc5d..59e5da8 100755
--- a/mobile.sh
+++ b/mobile.sh
@@ -1,5 +1,10 @@
#!/bin/bash
+if [[ "$snapsource" == "" ]]
+then
+ export snapsource="https://github.com/Gubolin/snap.git"
+fi
+
if [[ $1 = "" ]]
then
echo "Usage: mobile.sh PLATFORM [BUILDSOURCE]"
@@ -25,7 +30,7 @@ rm -rf www config.xml
if [[ $2 == "" ]]
then
- git clone https://github.com/Gubolin/snap.git www
+ git clone "$snapsource" www
cd www/
git checkout mobileapp
else