summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2024-07-15 17:41:05 +0900
committerTheSiahxyz <164138827+TheSiahxyz@users.noreply.github.com>2024-07-15 17:41:05 +0900
commit62a3e63fb6009f802d0266c5a727fbf084e1c7cc (patch)
tree5bb58fd9cc5a11db8ff61f781832a709d736a9d7
parentfb18b9c421a80bb14f713810ac0b8ded28c41ff4 (diff)
Init
-rwxr-xr-xpublic/thesiah.sh11
-rwxr-xr-xstatic/thesiah.sh11
2 files changed, 16 insertions, 6 deletions
diff --git a/public/thesiah.sh b/public/thesiah.sh
index ede9228..a121282 100755
--- a/public/thesiah.sh
+++ b/public/thesiah.sh
@@ -87,6 +87,10 @@ adduserandpass() {
whiptail --infobox "Adding user \"$name\"..." 7 50
useradd -m -g wheel -s /bin/zsh "$name" >/dev/null 2>&1 ||
usermod -a -G wheel "$name" && mkdir -p \
+ "/home/$name/.config" \
+ "/home/$name/.local/bin" \
+ "/home/$name/.local/share" \
+ "/home/$name/.local/src" \
"/home/$name/Desktop" \
"/home/$name/Documents" \
"/home/$name/Downloads" \
@@ -611,8 +615,7 @@ microsetup() {
}
finalize() {
- ln -sf /home/"$name"/.dotfiles/default/Pictures/wallpaper/bg.png /home/"$name"/.local/share/bg
- chown -R "$name":wheel /home/"$name"
+ sudo -u "$name" ln -sf /home/"$name"/.dotfiles/default/Pictures/wallpaper/bg.png /home/"$name"/.local/share/bg
# Farewell
whiptail --title "All done!" \
--msgbox "Congrats! Provided there were no hidden errors, the script completed successfully and all the programs and configuration files should be in place.\\n\\nTo run the new graphical environment, log out and log back in as your new user, then run the command \"startx\" to start the graphical environment (it will start automatically in tty1).\\n\\n.t Soomin" 13 80
@@ -633,7 +636,9 @@ welcomemsg || error "User exited."
getuserandpass || error "User exited."
# Decide cloning repositories.
-[ "$name" = "si" ] && repocheck || error "User exited."
+[ "$name" = "si" ] && {
+ repocheck || error "User exited."
+}
# Give warning if user already exists.
usercheck || error "User exited."
diff --git a/static/thesiah.sh b/static/thesiah.sh
index ede9228..a121282 100755
--- a/static/thesiah.sh
+++ b/static/thesiah.sh
@@ -87,6 +87,10 @@ adduserandpass() {
whiptail --infobox "Adding user \"$name\"..." 7 50
useradd -m -g wheel -s /bin/zsh "$name" >/dev/null 2>&1 ||
usermod -a -G wheel "$name" && mkdir -p \
+ "/home/$name/.config" \
+ "/home/$name/.local/bin" \
+ "/home/$name/.local/share" \
+ "/home/$name/.local/src" \
"/home/$name/Desktop" \
"/home/$name/Documents" \
"/home/$name/Downloads" \
@@ -611,8 +615,7 @@ microsetup() {
}
finalize() {
- ln -sf /home/"$name"/.dotfiles/default/Pictures/wallpaper/bg.png /home/"$name"/.local/share/bg
- chown -R "$name":wheel /home/"$name"
+ sudo -u "$name" ln -sf /home/"$name"/.dotfiles/default/Pictures/wallpaper/bg.png /home/"$name"/.local/share/bg
# Farewell
whiptail --title "All done!" \
--msgbox "Congrats! Provided there were no hidden errors, the script completed successfully and all the programs and configuration files should be in place.\\n\\nTo run the new graphical environment, log out and log back in as your new user, then run the command \"startx\" to start the graphical environment (it will start automatically in tty1).\\n\\n.t Soomin" 13 80
@@ -633,7 +636,9 @@ welcomemsg || error "User exited."
getuserandpass || error "User exited."
# Decide cloning repositories.
-[ "$name" = "si" ] && repocheck || error "User exited."
+[ "$name" = "si" ] && {
+ repocheck || error "User exited."
+}
# Give warning if user already exists.
usercheck || error "User exited."