-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathphilemon
executable file
·99 lines (82 loc) · 4.19 KB
/
philemon
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
#!/bin/sh
export BIN_DIR=$(dirname $(readlink -f $0))/bin
cat <<"EOF"
╱|、
(˚ˎ ◦7
|、 ˜〵
じしˍ,)ノ
Hi! I am Pus Philemon. I will help you boostrap your arch installation.
I will install dependencies, packages, configurations and dotfiles to your system.
At the end, I will also make sure that your packages are updated.
EOF
echo
echo "This script requires sudo privileges, and you might be prompted for your password"
echo
sudo -v
echo "First I will check if you have the required dependencies to run this script"
echo
$BIN_DIR/checkDependencies.sh || {
echo "I couldn't find or install the requirements, good luck to you :)" >&2
exit 1
}
echo "------------------"
echo "Now we are ready to proceed."
echo
echo "Installing packages"
echo
"$BIN_DIR"/installPackages.sh || exit 1
sudo -v
echo "Updating packages"
echo
source "$BIN_DIR"/updateFormatter.sh
upgrade_output=$(yay -Syu --noconfirm | tee /dev/tty || exit 1)
parsed_output=$(format_yay_output "$upgrade_output")
echo "Stowing dotfiles"
echo
cd "$BIN_DIR"/.. || exit
stow --adopt dotfiles --target="$HOME" || exit 1
echo "Now that everything is installed, I will verify some system level settings"
echo
$BIN_DIR/configureStuff.sh
cat <<"EOF"
@@&
@####@
@@&&888#@
@8&&888### 8@@
8888&@88##@@ *@888@:
o##@@8888#8#@* @8o&&&8@
8&&o&oo88o&o&o.8:**. . :@8&oo:o&#.
@888#8:::o:::o:ooo&&ooo:*::oo:@8888#&&&o&#
@###88*:::::o&&&&&*88&@88#&88&o*::**&:o:&o&@
8@#&&:::oo&&88#o8#&##8@&:&:#&&o:o::*::o88:8
@@o:oo88&888####@@@@#@oo::o&&o&o:&o:**##8:
.:o&oo8###88######@@@@##*.*.:8#@##88oo*::&#
*&o:&8#@@@88ooX##@@#@. ..##@@###88&&o:&o
oo&8#####@8:::@&o:#@@@o. .:#@@@@@@@@888o:.
.:ooo&8#@######8&8#8@#&*... :8@8:o#8**#&#&:*.
**o::o&&*8o@#o@@##888o.**......@8#*::o:8##88:*
*:oooo&8@###8:@o**.... .8*.#...8@##8#####8&o..
*::ooooo&88#&:o*......*.**o.... *o88@o.@@:.:
.**:::::oo&:*.:*:...**:**......*.....*8o.*&8o:*
.***:o*oo.&ooo::*****:***..*....:....*o****oo:*.
..*.**.:*o:oo&**:o:::*...........**...* ::o&:***.
....*..**********.****..*..*.*...***o*.::::*o:*.
..*.*.*..******....******.*.*.*....**:********..
.***o***.***...**:.*..**..........................
*::::*****..****...*.............................
.******.*....**.*.*...............**.......... ..
.::*****....******.*............*........ .....
*::***********..*...***.**..**.**............ .. ...
*::::::*.***.**..*...*****...................... ..
::::*****:***..*.....**...*...................... . .
.oo:::*::******....****....*................. .. .
ooo&:::*******....**...............................
oo&:::*::*:****.....*............................... ..
.ooo::&o::*:***...:**.......*....**........*...............
.&ooo&o:::::****.*:....................................... .
I, Pus Philemon, has upgraded and bootstrapped your system.
EOF
test "$parsed_output" && echo "I have upgraded these packages:"
sudo -v
sudo mkdir -p /var/log/upgrade_history
echo "$parsed_output" | sudo tee /var/log/upgrade_history/"$(date -u +%Y_%m_%dT%H_%M_%S)"