diff options
| author | Gubolin <gubolin@fantasymail.de> | 2015-03-04 18:35:40 +0100 |
|---|---|---|
| committer | Code WvS <code-wvs@quantentunnel.de> | 2015-03-04 18:39:39 +0100 |
| commit | 6769c91b58751b15ca45528ef0afbbc23a7525d2 (patch) | |
| tree | 1454fc93fa7c9b654d94643ed78e66d24221784c /binary.sh | |
| parent | 8ff8b1b3738c5dc7603f585dfa7cb6a434b368fd (diff) | |
| download | snap-yow-6769c91b58751b15ca45528ef0afbbc23a7525d2.tar.gz snap-yow-6769c91b58751b15ca45528ef0afbbc23a7525d2.zip | |
support cloud projects
Diffstat (limited to 'binary.sh')
| -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:" @@ -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 |
