diff --git a/arch-graphical-install-auto b/arch-graphical-install-auto index 42d0097..7122284 100755 --- a/arch-graphical-install-auto +++ b/arch-graphical-install-auto @@ -24,7 +24,7 @@ userpass="$3" archchroot="$4" hostname="$(cat /etc/hostname)" -version="${hostname#*-}" +[[ -z "${version}" ]] && version="${hostname#*-}" [[ -z "${username}" ]] && username="user1" [[ -z "${userpass}" ]] && userpass="user1" diff --git a/update.sh b/update.sh index 81b2198..d335f06 100755 --- a/update.sh +++ b/update.sh @@ -10,7 +10,8 @@ WEBADDRESS="https://github.com/simono41/SpectreOS.git" repo="SpectreOS" user="user1" hostname="$(cat /etc/hostname)" -version="${hostname#*-}" +version="${1}" +[[ -z "${version}" ]] && version="${hostname#*-}" if [[ $EUID -ne 0 ]]; then echo "This script must be run as root" 1>&2 @@ -45,7 +46,7 @@ then echo "Git is not installet" pacman -S git --needed --noconfirm fi - /opt/${repo}/arch-graphical-install-auto "${version}" "$2" "$3" + /opt/${repo}/arch-graphical-install-auto "${version}" "$2" "$3" "archchroot" read -p "Aktualisierung erfolgreich Abgeschlossen. Wollen sie den PC NEUSTARTEN?: [Y/n] " sicherheitsabfrage if [ "$sicherheitsabfrage" != "n" ] then