pkg var fixed in installPackacge fct
This commit is contained in:
parent
b230642432
commit
cfe6d89cd6
1 changed files with 15 additions and 15 deletions
|
@ -265,18 +265,18 @@ function installPackage () {
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
"apt")
|
"apt")
|
||||||
printf "[APT] Installing by $* "
|
printf "[APT] Installing by $pkg "
|
||||||
printf "\n[APT] installing by $*\n" &>> $logFile
|
printf "\n[APT] installing by $pkg\n" &>> $logFile
|
||||||
sudo apt-get install -fy $* &>> $logFile
|
sudo apt-get install -fy $pkg &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
printf "\n"
|
printf "\n"
|
||||||
;;
|
;;
|
||||||
"pip")
|
"pip")
|
||||||
if which pip3 >/dev/null; then
|
if which pip3 >/dev/null; then
|
||||||
printf "[PIP] Installing by $* "
|
printf "[PIP] Installing by $pkg "
|
||||||
printf "\n[PIP] installing by $*\n" &>> $logFile
|
printf "\n[PIP] installing by $pkg\n" &>> $logFile
|
||||||
sudo -H pip3 install --upgrade $* &>> $logFile
|
sudo -H pip3 install --upgrade $pkg &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
@ -289,9 +289,9 @@ function installPackage () {
|
||||||
;;
|
;;
|
||||||
"npm")
|
"npm")
|
||||||
if which npm >/dev/null; then
|
if which npm >/dev/null; then
|
||||||
printf "[NPM] Installing by $* "
|
printf "[NPM] Installing by $pkg "
|
||||||
printf "\n[NPM] installing by $*\n" &>> $logFile
|
printf "\n[NPM] installing by $pkg\n" &>> $logFile
|
||||||
sudo npm install -g $* &>> $logFile
|
sudo npm install -g $pkg &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
@ -303,9 +303,9 @@ function installPackage () {
|
||||||
;;
|
;;
|
||||||
"gem")
|
"gem")
|
||||||
if which gem >/dev/null; then
|
if which gem >/dev/null; then
|
||||||
printf "[GEM] Installing by $* "
|
printf "[GEM] Installing by $pkg "
|
||||||
printf "\n[GEM] installing by $*\n" &>> $logFile
|
printf "\n[GEM] installing by $pkg\n" &>> $logFile
|
||||||
sudo gem install $* &>> $logFile
|
sudo gem install $pkg &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
@ -317,9 +317,9 @@ function installPackage () {
|
||||||
;;
|
;;
|
||||||
"snap")
|
"snap")
|
||||||
if which snap >/dev/null; then
|
if which snap >/dev/null; then
|
||||||
printf "[SNAP] Installing by $* "
|
printf "[SNAP] Installing by $pkg "
|
||||||
printf "\n[SNAP] installing by $*\n" &>> $logFile
|
printf "\n[SNAP] installing by $pkg\n" &>> $logFile
|
||||||
sudo snap install $* &>> $logFile
|
sudo snap install $pkg &>> $logFile
|
||||||
ret_code=$?
|
ret_code=$?
|
||||||
retCode $ret_code
|
retCode $ret_code
|
||||||
printf "\n"
|
printf "\n"
|
||||||
|
|
Loading…
Reference in a new issue