Fixing a few things...

master
Brie Bruns 2016-02-27 15:07:25 -07:00
parent 07a2e87985
commit 569e3799fe
1 changed files with 8 additions and 6 deletions

View File

@ -17,17 +17,17 @@ ZIPURL="https://github.com/letsencrypt/letsencrypt/archive/master.zip"
GITREPO="https://github.com/letsencrypt/letsencrypt" GITREPO="https://github.com/letsencrypt/letsencrypt"
if [ $# -eq 0 ]; then if [ $# -eq 0 ]; then
echo "Command Help:" echo "Command Help:"
echo "-g : download using git from master repo" echo "-g : download using git from master repo"
echo "-z : download zip from main repo and extract" echo "-z : download zip from main repo and extract"
exit 0 exit 0
fi fi
while getopts "g:z:" opt; do while getopts "gz" opt; do
case $opt in case $opt in
g) downloadtype="git";; g) downloadtype="git";;
t) downloadtype="zip";; z) downloadtype="zip";;
esac esac
done done
@ -35,10 +35,12 @@ cd ${DESTDIR}
case $downloadtype in case $downloadtype in
git) git)
echo "Cloning repo into ${DESTDIR}..."
git clone ${GITREPO} git clone ${GITREPO}
;; ;;
tar) tar)
echo "Downloading ${ZIPURL} into ${DESTDIR}
curl -o letsencrypt.zip ${ZIPURL} curl -o letsencrypt.zip ${ZIPURL}
unzip letsencrypt.zip unzip letsencrypt.zip
;; ;;
esac esac