From 036f45d2e4de65338265e4970847c6dc8acc7d99 Mon Sep 17 00:00:00 2001 From: simono41 Date: Sun, 8 Jul 2018 23:31:48 +0200 Subject: [PATCH] packageupdate --- arch-graphical-install-auto | 12 ++++++++---- compress.sh | 5 +++-- update.sh | 2 +- 3 files changed, 12 insertions(+), 7 deletions(-) diff --git a/arch-graphical-install-auto b/arch-graphical-install-auto index eda88b7..4b9cace 100755 --- a/arch-graphical-install-auto +++ b/arch-graphical-install-auto @@ -23,6 +23,7 @@ version="$1" username="$2" userpass="$3" skip="$4" +packageupdate="$5" hostname="$(cat /etc/hostname)" [[ -z "${version}" ]] && version="${hostname#*-}" @@ -340,7 +341,7 @@ if [ -f /var/lib/pacman/db.lck ];then fi # vollinstallation -if [ "$version" != "lite" ]; then +if [ "$version" != "lite" ] && [ "$packageupdate" != "skip" ]; then standartinstallation fi @@ -559,7 +560,7 @@ chmod +x /usr/bin/aurupdater setcap cap_net_raw+ep /bin/ping su "$username" -c "aurinstaller "https://aur.archlinux.org/pamac-aur.git"" -if [ "$version" != "pi" ]; then +if [ "$version" != "pi" ] && [ "$packageupdate" != "skip" ]; then su "$username" -c "aurinstaller "https://aur.archlinux.org/plymouth.git"" su "$username" -c "aurinstaller "https://aur.archlinux.org/plymouth-theme-dark-arch.git"" plymouth-set-default-theme -R dark-arch @@ -764,7 +765,7 @@ if [ "$version" != "lite" ] && [ "$skip" != "skip" ]; then cp /opt/${repo}/*.jpg /usr/share/backgrounds/xfce/ chmod 755 -Rv /usr/share/backgrounds/xfce/ - if [ "$version" != "pi" ]; then + if [ "$version" != "pi" ] && [ "$packageupdate" != "skip" ]; then # zusatzsoftware su "$username" -c "aurinstaller "https://aur.archlinux.org/google-chrome.git"" su "$username" -c "aurinstaller spotify" @@ -798,7 +799,10 @@ if pacman -Qdtq; then else echo "Es müssen keine verwaisten Packete entfernt werden :)" fi -pacman -Syu --needed --noconfirm + +if [ "$packageupdate" != "skip" ]; then + pacman -Syu --needed --noconfirm +fi if [ "${version}" == "libre" ]; then mkinitcpio -p linux-libre diff --git a/compress.sh b/compress.sh index 9b03e62..07a7fc9 100755 --- a/compress.sh +++ b/compress.sh @@ -21,11 +21,12 @@ if [ "make" == "$1" ]; then rm ${archiv}.tar elif [ "restore" == "$1" ]; then - [[ -z "${3}" ]] && ort="." + pfad=$3 + [[ -z "${pfad}" ]] && pfad="." pixz -d ${archiv} ${archiv/.pxz*} - tar -xf ${archiv/.pxz*} -C ${ort} + tar -xf ${archiv/.pxz*} -C ${pfad} # säuberung rm ${archiv/.pxz*} diff --git a/update.sh b/update.sh index a76fc2e..8af63ad 100755 --- a/update.sh +++ b/update.sh @@ -46,7 +46,7 @@ then echo "Git is not installet" pacman -S git --needed --noconfirm fi - /opt/${repo}/arch-graphical-install-auto "${version}" "$2" "$3" "skip" + /opt/${repo}/arch-graphical-install-auto "${version}" "$2" "$3" "skip" "$4" read -p "Aktualisierung erfolgreich Abgeschlossen. Wollen sie den PC NEUSTARTEN?: [Y/n] " sicherheitsabfrage if [ "$sicherheitsabfrage" != "n" ] then