update after repo added improved

This commit is contained in:
Francois B 2018-01-01 16:58:02 +01:00
parent b490ebf952
commit fad588b898
3 changed files with 19 additions and 3 deletions

View file

@ -133,6 +133,8 @@ function updateSystem () {
ret_code=$? ret_code=$?
retCode $ret_code retCode $ret_code
printf "\n" printf "\n"
repoAdded=0
} }
# #
@ -508,6 +510,7 @@ function addSpecificRepoFct () {
printf "[ADD_REPO_FCT] for package : $1, " printf "[ADD_REPO_FCT] for package : $1, "
printf "add repo by function : ${appRepo[1]} \n" printf "add repo by function : ${appRepo[1]} \n"
eval "${appRepo[1]}" eval "${appRepo[1]}"
repoAdded=$(($repoAdded+1))
fi fi
done done
if [ "$2" == "yes" ]; then if [ "$2" == "yes" ]; then
@ -546,7 +549,9 @@ function installAppsFromList () {
done done
unset i unset i
unset app unset app
updateSystem if [ "$repoAdded" -gt "0" ]; then
updateSystem
fi
for i in $Apps; do for i in $Apps; do
app=(${i//;/ }) app=(${i//;/ })
if [ "${app[2]}" == "$1" ]; then if [ "${app[2]}" == "$1" ]; then

View file

@ -36,6 +36,11 @@ logFile="/home/"$myHomedir"/yggdrasil.log"
cTime=$(date +%H:%M) cTime=$(date +%H:%M)
cDate=$(date +%d-%m-%Y) cDate=$(date +%d-%m-%Y)
#
# repo/ppa added counter
#
repoAdded=0
# #
# shell color codes # shell color codes
# #

View file

@ -38,8 +38,14 @@ echo "--[ Yggdrasil log ]--[ "$cDate" ]--[ "$cTime" ]-----------------------" >>
# #
# arguments/options management with getopts # arguments/options management with getopts
# #
while getopts ":h,v,a,c" option; do while getopts ":h,v,a,c,t" option; do
case "$option" in case "$option" in
t) #test purpose only
installNightly
installBeta
installBase
exit
;;
a) # install all apps a) # install all apps
#TODO: #TODO:
msg "Installing all Apps" msg "Installing all Apps"