From af0f78741ebab4beb4df5ec2bd37cca21d355d47 Mon Sep 17 00:00:00 2001 From: Francois B Date: Wed, 14 Mar 2018 19:44:29 +0100 Subject: [PATCH] arch+rscript removed for now --- core_functions.sh | 53 +++++++---------------------------------------- 1 file changed, 8 insertions(+), 45 deletions(-) diff --git a/core_functions.sh b/core_functions.sh index 2ada343..0ea1813 100644 --- a/core_functions.sh +++ b/core_functions.sh @@ -249,51 +249,14 @@ function addRepo () { # input : url of package, package name # function installPackageDpkg () { - runCmd "cd /tmp" - printf "\n" - runCmd "wget -q -O $2 $1" - printf "\n" - runCmd "sudo dpkg -i $2 " - printf "\n" - runCmd "sudo apt-get install -fy" - printf "\n" -} - -# -# install app by remote shell script -# input : script url, script name, opt extra param -#TODO:#TODO:#TODO:#TODO:#TODO:#TODO:#TODO:#TODO: -function installAppRemoteScript () { - runCmd "cd /tmp" - printf "\n" - runCmd "wget -q -O $2 $1" - printf "\n" - runCmd "chmod +x $2" - printf "\n" - -} - -# -# install app from archive -# input : archive url, archive name, archive type, orig dir, dest dir -#TODO:#TODO:#TODO:#TODO:#TODO:#TODO:#TODO:#TODO: -function installAppFromArchive () { - runCmd "cd /tmp" - printf "\n" - runCmd "wget -q -O $2 $1" - printf "\n" - case "$3" in - "tgz") - runCmd "tar xzf $2" - printf "\n" - ;; - "xz") - runCmd "tar xvJf $2" - printf "\n" - ;; - esac - runCmd "mkdir -p $5" - printf "\n" + printf "[PKG] Installing $2 from $1 " + printf "\n[PKG] installing $2 from $1\n" &>> $logFile + cd /tmp \ + && wget -q -O $2 $1 \ + && sudo dpkg -i $2 \ + && sudo apt-get install -fy &>> $logFile + ret_code=$? + retCode $ret_code } #