/[zanavi_public1]/navit/download-androidstudio-files.sh
ZANavi

Contents of /navit/download-androidstudio-files.sh

Parent Directory Parent Directory | Revision Log Revision Log


Revision 59 - (show annotations) (download) (as text)
Sat Jun 3 12:38:27 2017 UTC (3 years, 5 months ago) by zoff99
File MIME type: application/x-sh
File size: 946 byte(s)
v2.0.57a
1 #!/bin/bash
2
3 # get values from git commandline ------------
4 BRANCH=$(git rev-parse --abbrev-ref HEAD|sed -e 's# #%20#g'|sed -e 'sx#x%23xg'|sed -e 's#/#%2F#g'| grep -v HEAD || git name-rev --name-only HEAD|sed -e 's#^remotes/origin/##'|sed -e 's#^origin/##'|sed -e 's# #%20#g'|sed -e 'sx#x%23xg'|sed -e 's#/#%2F#g')
5 REPO="zanavi"
6 REPOUSER=$(git config --get remote.origin.url|cut -d'/' -f 4)
7 # get values from git commandline ------------
8
9 echo $BRANCH
10 echo $REPO
11 echo $REPOUSER
12
13 # debug
14 # https://circleci.com/api/v1/project/zoff99/zanavi/latest/artifacts/0/$CIRCLE_ARTIFACTS/android-studio-project.zip?filter=successful&branch=master
15
16 wget 'https://circleci.com/api/v1/project/'"$REPOUSER"'/'"$REPO"'/latest/artifacts/0/$CIRCLE_ARTIFACTS/android-studio-project.zip?filter=successful&branch='"$BRANCH" -O ./android-studio-project.zip
17 unzip -o ./android-studio-project.zip
18 ls -al ./android-studio-project.zip
19 rm -f ./android-studio-project.zip

   
Visit the ZANavi Wiki