summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2015-03-04 18:35:40 +0100
committerGubolin <gubolin@fantasymail.de>2015-03-04 18:35:40 +0100
commitfbb10834c62ca0712858ec4685b27f4ac1ef10ae (patch)
tree4021a30ab314f2551d2e43ccb3b19ab8285e4571
parent4b2ca15547c88ff9a785d4716011079cf6c7ae09 (diff)
downloadsnap-mobileapp.tar.gz
snap-mobileapp.zip
support cloud projectsmobileapp
-rwxr-xr-xbinary.sh18
1 files changed, 13 insertions, 5 deletions
diff --git a/binary.sh b/binary.sh
index 83b8d12..809d1fe 100755
--- a/binary.sh
+++ b/binary.sh
@@ -18,6 +18,8 @@ then
echo " Desktop win32 win64 osx linux32 linux64"
echo ""
echo "If FILE/URL is given, it will be #open-ed inside Snap! immediately. URL will be loaded at runtime."
+ echo "If URL starts with a hash ('#'), it will be used as initial base url suffix"
+ echo " (for example '#present:UserName=foo\&ProjectName=bar', escape the '&')."
echo ""
echo ""
echo "The following environment variables will be used, if available:"
@@ -65,11 +67,17 @@ then
url=$3
fi
- # load custom project from url
- sed -i "/ide\.openIn/a\
- ide.droppedText(ide.getURL('$url'));" snap.html
- sed -i "/this.toggleAppMode(false)/d" gui.js
- sed -i "s/snap.html/snap.html#run:/g" config.xml package.json
+ if [[ $url == \#* ]]
+ then
+ # load custom project from cloud or string
+ sed -i "s/snap.html/snap.html${url}/g" config.xml package.json
+ else
+ # load custom project from url
+ sed -i "/ide\.openIn/a\
+ ide.droppedText(ide.getURL('$url'));" snap.html
+ sed -i "/this.toggleAppMode(false)/d" gui.js
+ sed -i "s/snap.html/snap.html#run:/g" config.xml package.json
+ fi
fi
# compress all js files