fct update fixed + cosmetic changes
This commit is contained in:
parent
748a6c7403
commit
2cc3c26b10
1 changed files with 13 additions and 14 deletions
|
@ -112,28 +112,32 @@ function updateSystem () {
|
||||||
sudo apt-get update &>> $logFile
|
sudo apt-get update &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
printf "\n"
|
|
||||||
|
|
||||||
printf "[APT] upgrade "
|
printf "[APT] upgrade "
|
||||||
printf "\n[APT] upgrade\n" &>> $logFile
|
printf "\n[APT] upgrade\n" &>> $logFile
|
||||||
sudo apt-get -y upgrade &>> $logFile
|
sudo apt-get -y upgrade &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
printf "\n"
|
|
||||||
|
|
||||||
printf "[APT] dist-upgrade "
|
printf "[APT] dist-upgrade "
|
||||||
printf "\n[APT] dist-upgrade\n" &>> $logFile
|
printf "\n[APT] dist-upgrade\n" &>> $logFile
|
||||||
sudo apt-get -y dist-upgrade &>> $logFile
|
sudo apt-get -y dist-upgrade &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
printf "\n"
|
|
||||||
|
|
||||||
printf "[SNAP] refresh "
|
if ! which snap >/dev/null; then
|
||||||
printf "\n[SNAP] refresh\n" &>> $logFile
|
printf "[ERR] snap not found, installing...\n"
|
||||||
sudo snap refresh &>> $logFile
|
printf "\n[ERR] snap not found, installing...\n" &>> $logFile
|
||||||
ret_code=$?
|
installPackage apt "snapd"
|
||||||
retCode $ret_code
|
ret_code=$?
|
||||||
printf "\n"
|
if [ $ret_code == 0 ]; then
|
||||||
|
printf "[SNAP] refresh "
|
||||||
|
printf "\n[SNAP] refresh\n" &>> $logFile
|
||||||
|
sudo snap refresh &>> $logFile
|
||||||
|
ret_code=$?
|
||||||
|
retCode $ret_code
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
repoAdded=0
|
repoAdded=0
|
||||||
}
|
}
|
||||||
|
@ -269,7 +273,6 @@ function installPackage () {
|
||||||
sudo apt-get install -fy $pkg &>> $logFile
|
sudo apt-get install -fy $pkg &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
printf "\n"
|
|
||||||
;;
|
;;
|
||||||
"pip")
|
"pip")
|
||||||
if which pip3 >/dev/null; then
|
if which pip3 >/dev/null; then
|
||||||
|
@ -278,7 +281,6 @@ function installPackage () {
|
||||||
sudo -H pip3 install --upgrade $pkg &>> $logFile
|
sudo -H pip3 install --upgrade $pkg &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
printf "\n"
|
|
||||||
else
|
else
|
||||||
printf "[ERR] pip3 not found, installing...\n"
|
printf "[ERR] pip3 not found, installing...\n"
|
||||||
printf "\n[ERR] pip3 not found, installing...\n" &>> $logFile
|
printf "\n[ERR] pip3 not found, installing...\n" &>> $logFile
|
||||||
|
@ -294,7 +296,6 @@ function installPackage () {
|
||||||
sudo npm install -g $pkg &>> $logFile
|
sudo npm install -g $pkg &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
printf "\n"
|
|
||||||
else
|
else
|
||||||
printf "[ERR] npm not found, installing...\n"
|
printf "[ERR] npm not found, installing...\n"
|
||||||
printf "\n[ERR] npm not found, installing...\n" &>> $logFile
|
printf "\n[ERR] npm not found, installing...\n" &>> $logFile
|
||||||
|
@ -308,7 +309,6 @@ function installPackage () {
|
||||||
sudo gem install $pkg &>> $logFile
|
sudo gem install $pkg &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
printf "\n"
|
|
||||||
else
|
else
|
||||||
printf "[ERR] gem not found, installing...\n"
|
printf "[ERR] gem not found, installing...\n"
|
||||||
printf "\n[ERR] gem not found, installing...\n" &>> $logFile
|
printf "\n[ERR] gem not found, installing...\n" &>> $logFile
|
||||||
|
@ -322,7 +322,6 @@ function installPackage () {
|
||||||
sudo snap install $pkg --classic &>> $logFile
|
sudo snap install $pkg --classic &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
printf "\n"
|
|
||||||
else
|
else
|
||||||
printf "[ERR] snap not found, installing...\n"
|
printf "[ERR] snap not found, installing...\n"
|
||||||
printf "\n[ERR] snap not found, installing...\n" &>> $logFile
|
printf "\n[ERR] snap not found, installing...\n" &>> $logFile
|
||||||
|
|
Loading…
Reference in a new issue