|
|
|
@ -37,7 +37,7 @@ if [ ! -z $exitcode ];then
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|
|
|
|
|
|
|
|
|
|
output="$(sudo apt update 2>&1)"
|
|
|
|
|
output="$(sudo LANG=C apt update 2>&1)"
|
|
|
|
|
exitcode=$?
|
|
|
|
|
|
|
|
|
|
#inform user packages are upgradeable
|
|
|
|
@ -56,7 +56,7 @@ fi
|
|
|
|
|
#remove residual packages
|
|
|
|
|
sudo apt autoremove -y && sudo apt clean && sudo apt-get purge -y $(dpkg -l | grep '^rc' | awk '{print $2}')
|
|
|
|
|
|
|
|
|
|
output="$(sudo apt-get install --no-install-recommends --dry-run $PKG_LIST 2>&1)"
|
|
|
|
|
output="$(sudo LANG=C apt-get install --no-install-recommends --dry-run $PKG_LIST 2>&1)"
|
|
|
|
|
echo "output: $output"
|
|
|
|
|
|
|
|
|
|
errors="$(echo "$output" | grep '^[(W)|(E)|(Err]:')"
|
|
|
|
@ -76,15 +76,9 @@ if [ ! -z "$INSTALL_LIST" ];then
|
|
|
|
|
|
|
|
|
|
echo -e "These packages will be installed: \e[2m$INSTALL_LIST\e[22m"
|
|
|
|
|
|
|
|
|
|
if [ "$(cat "${DIRECTORY}/data/settings/Debug mode")" == 'Yes' ];then
|
|
|
|
|
#debug mode
|
|
|
|
|
output="$(sudo apt-get install -y --no-install-recommends $PKG_LIST 1>&2)"
|
|
|
|
|
exitcode=$?
|
|
|
|
|
else
|
|
|
|
|
#normal mode
|
|
|
|
|
output="$(sudo apt-get install -y --no-install-recommends $PKG_LIST 2>&1)"
|
|
|
|
|
exitcode=$?
|
|
|
|
|
fi
|
|
|
|
|
#normal mode
|
|
|
|
|
output="$(sudo LANG=C apt-get install -y --no-install-recommends $PKG_LIST 2>&1)"
|
|
|
|
|
exitcode=$?
|
|
|
|
|
echo 'Apt finished.'
|
|
|
|
|
|
|
|
|
|
errors="$(echo "$output" | grep '^[(W)|(E)|(Err]:')"
|
|
|
|
@ -102,7 +96,7 @@ if [ ! -z "$INSTALL_LIST" ];then
|
|
|
|
|
# INSTALL_LIST="${INSTALL_LIST} ${i}" #add package to install list
|
|
|
|
|
# fi
|
|
|
|
|
#done
|
|
|
|
|
INSTALL_LIST="$(sudo apt-get install --no-install-recommends --dry-run $PKG_LIST | sed -n '/The following packages/,/to remove/p' | sed -e '2,$!d' -e '$d' | tr -d '*' | tr '\n' ' ' | sed 's/The following.*//')"
|
|
|
|
|
INSTALL_LIST="$(sudo LANG=C apt-get install --no-install-recommends --dry-run $PKG_LIST | sed -n '/The following packages/,/to remove/p' | sed -e '2,$!d' -e '$d' | tr -d '*' | tr '\n' ' ' | sed 's/The following.*//')"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if [ ! -z $INSTALL_LIST ];then
|
|
|
|
|