mirror of
https://github.com/alexanderepstein/Bash-Snippets
synced 2018-11-08 02:59:35 +01:00
Fixing error on update echo
This commit is contained in:
parent
b7a5e6e0dd
commit
5415a3670f
@ -45,7 +45,7 @@ update()
|
|||||||
cd $repositoryName || { echo 'Update Failed' ; exit 1 ;}
|
cd $repositoryName || { echo 'Update Failed' ; exit 1 ;}
|
||||||
git checkout "v$latestVersion" 2> /dev/null || git checkout "$latestVersion" 2> /dev/null || echo "Couldn't git checkout to stable release, updating to latest commit."
|
git checkout "v$latestVersion" 2> /dev/null || git checkout "$latestVersion" 2> /dev/null || echo "Couldn't git checkout to stable release, updating to latest commit."
|
||||||
chmod a+x install.sh #this might be necessary in your case but wasnt in mine.
|
chmod a+x install.sh #this might be necessary in your case but wasnt in mine.
|
||||||
./$nameOfInstallFile "update" || { echo "Permissions Error: try running the update as sudo"; exit 1; }
|
./$nameOfInstallFile "update" || exit 1
|
||||||
cd ..
|
cd ..
|
||||||
rm -r -f $repositoryName || { echo "Permissions Error: update succesfull but cannot delete temp files located at ~/$repositoryName delete this directory with sudo"; exit 1; }
|
rm -r -f $repositoryName || { echo "Permissions Error: update succesfull but cannot delete temp files located at ~/$repositoryName delete this directory with sudo"; exit 1; }
|
||||||
else
|
else
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
base=""
|
base=""
|
||||||
exchangeTo=""
|
exchangeTo=""
|
||||||
currentVersion="1.2.1"
|
currentVersion="1.2.1"
|
||||||
|
|
||||||
configuredClient=""
|
configuredClient=""
|
||||||
|
|
||||||
## This function determines which http get tool the system has installed and returns an error if there isnt one
|
## This function determines which http get tool the system has installed and returns an error if there isnt one
|
||||||
@ -181,7 +180,7 @@ update()
|
|||||||
cd $repositoryName || { echo 'Update Failed' ; exit 1 ;}
|
cd $repositoryName || { echo 'Update Failed' ; exit 1 ;}
|
||||||
git checkout "v$latestVersion" 2> /dev/null || git checkout "$latestVersion" 2> /dev/null || echo "Couldn't git checkout to stable release, updating to latest commit."
|
git checkout "v$latestVersion" 2> /dev/null || git checkout "$latestVersion" 2> /dev/null || echo "Couldn't git checkout to stable release, updating to latest commit."
|
||||||
chmod a+x install.sh #this might be necessary in your case but wasnt in mine.
|
chmod a+x install.sh #this might be necessary in your case but wasnt in mine.
|
||||||
./$nameOfInstallFile "update" || { echo "Permissions Error: try running the update as sudo"; exit 1; }
|
./$nameOfInstallFile "update" || exit 1
|
||||||
cd ..
|
cd ..
|
||||||
rm -r -f $repositoryName || { echo "Permissions Error: update succesfull but cannot delete temp files located at ~/$repositoryName delete this directory with sudo"; exit 1; }
|
rm -r -f $repositoryName || { echo "Permissions Error: update succesfull but cannot delete temp files located at ~/$repositoryName delete this directory with sudo"; exit 1; }
|
||||||
else
|
else
|
||||||
|
@ -109,7 +109,7 @@ update()
|
|||||||
cd $repositoryName || { echo 'Update Failed' ; exit 1 ;}
|
cd $repositoryName || { echo 'Update Failed' ; exit 1 ;}
|
||||||
git checkout "v$latestVersion" 2> /dev/null || git checkout "$latestVersion" 2> /dev/null || echo "Couldn't git checkout to stable release, updating to latest commit."
|
git checkout "v$latestVersion" 2> /dev/null || git checkout "$latestVersion" 2> /dev/null || echo "Couldn't git checkout to stable release, updating to latest commit."
|
||||||
chmod a+x install.sh #this might be necessary in your case but wasnt in mine.
|
chmod a+x install.sh #this might be necessary in your case but wasnt in mine.
|
||||||
./$nameOfInstallFile "update" || { echo "Permissions Error: try running the update as sudo"; exit 1; }
|
./$nameOfInstallFile "update" || exit 1
|
||||||
cd ..
|
cd ..
|
||||||
rm -r -f $repositoryName || { echo "Permissions Error: update succesfull but cannot delete temp files located at ~/$repositoryName delete this directory with sudo"; exit 1; }
|
rm -r -f $repositoryName || { echo "Permissions Error: update succesfull but cannot delete temp files located at ~/$repositoryName delete this directory with sudo"; exit 1; }
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user