summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGubolin <gubolin@fantasymail.de>2015-03-04 18:35:40 +0100
committerCode WvS <code-wvs@quantentunnel.de>2015-03-04 18:39:39 +0100
commit6769c91b58751b15ca45528ef0afbbc23a7525d2 (patch)
tree1454fc93fa7c9b654d94643ed78e66d24221784c
parent8ff8b1b3738c5dc7603f585dfa7cb6a434b368fd (diff)
downloadsnap-yow-6769c91b58751b15ca45528ef0afbbc23a7525d2.tar.gz
snap-yow-6769c91b58751b15ca45528ef0afbbc23a7525d2.zip
support cloud projects
-rwxr-xr-xbinary.sh18
1 files changed, 13 insertions, 5 deletions
diff --git a/binary.sh b/binary.sh
index b8ba90c..5c5d89e 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:"
@@ -60,11 +62,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