diff options
| author | Gubolin <gubolin@fantasymail.de> | 2015-03-04 18:35:40 +0100 |
|---|---|---|
| committer | Gubolin <gubolin@fantasymail.de> | 2015-03-04 18:35:40 +0100 |
| commit | fbb10834c62ca0712858ec4685b27f4ac1ef10ae (patch) | |
| tree | 4021a30ab314f2551d2e43ccb3b19ab8285e4571 | |
| parent | 4b2ca15547c88ff9a785d4716011079cf6c7ae09 (diff) | |
| download | snap-mobileapp.tar.gz snap-mobileapp.zip | |
support cloud projectsmobileapp
| -rwxr-xr-x | binary.sh | 18 |
1 files changed, 13 insertions, 5 deletions
@@ -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 |
