-
Notifications
You must be signed in to change notification settings - Fork 1
/
updater
executable file
·34 lines (34 loc) · 1.15 KB
/
updater
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#!/usr/bin/bash
# SCRIPT - Updates all Files
# Will be started as an alias for setup
if [[ $* = *"--help"* ]]; then
echo "Setup for Archlinux"
echo "https://arch-tui-installer.github.io"
echo
echo "--skip-update Run Setup without Updating"
echo "--debug Run Setup in Debugmode"
echo "--help Shows this message"
exit
elif [[ $* = *"--skip-update"* ]]; then
if [[ $* = *"--debug"* ]]; then
setup --debug
else
setup
fi
exit
fi
dialog --title "Updater" --extra-button --extra-label "Quit" --msgbox "The Updater will update the Setup to be up to date.\nTo do that, you must be connected to the internet.\nPlease make sure you are connected to the internet." 0 0
if [[ $? == 3 ]]; then
exit
fi
mkdir -p /var/setup
if [[ ! -d /var/setup/git ]]; then
git clone https://github.com/Niklas20114552/arch-tui-installer /var/setup/git --quiet | dialog --title "Updating..." --infobox "Git-Repository is beeing updated..." 3 45
fi
(cd /var/setup/git && git pull --quiet | dialog --title "Updating..." --infobox "Git-Repository is beeing updated..." 3 45)
/var/setup/git/updating/update-files
if [[ $* = *"--debug"* ]]; then
setup --debug
else
setup
fi