~/.local/src used for repositories
This commit is contained in:
parent
53fd907dd6
commit
2d958a3cb4
14
larbs.sh
14
larbs.sh
@ -45,6 +45,7 @@ selectdotfiles() { \
|
|||||||
getuserandpass() { \
|
getuserandpass() { \
|
||||||
# Prompts user for new username an password.
|
# Prompts user for new username an password.
|
||||||
name=$(dialog --inputbox "First, please enter a name for the user account." 10 60 3>&1 1>&2 2>&3 3>&1) || exit
|
name=$(dialog --inputbox "First, please enter a name for the user account." 10 60 3>&1 1>&2 2>&3 3>&1) || exit
|
||||||
|
repodir="/home/$name/.local/src"; mkdir -p "$repodir"
|
||||||
while ! echo "$name" | grep "^[a-z_][a-z0-9_-]*$" >/dev/null 2>&1; do
|
while ! echo "$name" | grep "^[a-z_][a-z0-9_-]*$" >/dev/null 2>&1; do
|
||||||
name=$(dialog --no-cancel --inputbox "Username not valid. Give a username beginning with a letter, with only lowercase letters, - or _." 10 60 3>&1 1>&2 2>&3 3>&1)
|
name=$(dialog --no-cancel --inputbox "Username not valid. Give a username beginning with a letter, with only lowercase letters, - or _." 10 60 3>&1 1>&2 2>&3 3>&1)
|
||||||
done
|
done
|
||||||
@ -99,9 +100,10 @@ maininstall() { # Installs all needed programs from main repo.
|
|||||||
}
|
}
|
||||||
|
|
||||||
gitmakeinstall() {
|
gitmakeinstall() {
|
||||||
dir=$(mktemp -d)
|
progname="$(basename "$1")"
|
||||||
dialog --title "LARBS Installation" --infobox "Installing \`$(basename "$1")\` ($n of $total) via \`git\` and \`make\`. $(basename "$1") $2" 5 70
|
dir="$repodir/$progname"
|
||||||
git clone --depth 1 "$1" "$dir" >/dev/null 2>&1
|
dialog --title "LARBS Installation" --infobox "Installing \`$progname\` ($n of $total) via \`git\` and \`make\`. $(basename "$1") $2" 5 70
|
||||||
|
git clone --depth 1 "$1" "$dir" >/dev/null 2>&1 || { cd "$dir" || return ; git pull --force origin master;}
|
||||||
cd "$dir" || exit
|
cd "$dir" || exit
|
||||||
make >/dev/null 2>&1
|
make >/dev/null 2>&1
|
||||||
make install >/dev/null 2>&1
|
make install >/dev/null 2>&1
|
||||||
@ -134,7 +136,7 @@ installationloop() { \
|
|||||||
esac
|
esac
|
||||||
done < /tmp/progs.csv ;}
|
done < /tmp/progs.csv ;}
|
||||||
|
|
||||||
putgitrepo() { # Downlods a gitrepo $1 and places the files in $2 only overwriting conflicts
|
putgitrepo() { # Downloads a gitrepo $1 and places the files in $2 only overwriting conflicts
|
||||||
dialog --infobox "Downloading and installing config files..." 4 60
|
dialog --infobox "Downloading and installing config files..." 4 60
|
||||||
[ -z "$3" ] && branch="master" || branch="$repobranch"
|
[ -z "$3" ] && branch="master" || branch="$repobranch"
|
||||||
dir=$(mktemp -d)
|
dir=$(mktemp -d)
|
||||||
@ -217,10 +219,10 @@ systembeepoff
|
|||||||
newperms "%wheel ALL=(ALL) ALL #LARBS
|
newperms "%wheel ALL=(ALL) ALL #LARBS
|
||||||
%wheel ALL=(ALL) NOPASSWD: /usr/bin/shutdown,/usr/bin/reboot,/usr/bin/systemctl suspend,/usr/bin/wifi-menu,/usr/bin/mount,/usr/bin/umount,/usr/bin/pacman -Syu,/usr/bin/pacman -Syyu,/usr/bin/packer -Syu,/usr/bin/packer -Syyu,/usr/bin/systemctl restart NetworkManager,/usr/bin/rc-service NetworkManager restart,/usr/bin/pacman -Syyu --noconfirm,/usr/bin/loadkeys,/usr/bin/yay,/usr/bin/pacman -Syyuw --noconfirm"
|
%wheel ALL=(ALL) NOPASSWD: /usr/bin/shutdown,/usr/bin/reboot,/usr/bin/systemctl suspend,/usr/bin/wifi-menu,/usr/bin/mount,/usr/bin/umount,/usr/bin/pacman -Syu,/usr/bin/pacman -Syyu,/usr/bin/packer -Syu,/usr/bin/packer -Syyu,/usr/bin/systemctl restart NetworkManager,/usr/bin/rc-service NetworkManager restart,/usr/bin/pacman -Syyu --noconfirm,/usr/bin/loadkeys,/usr/bin/yay,/usr/bin/pacman -Syyuw --noconfirm"
|
||||||
|
|
||||||
# Make zsh the default shell for the user
|
# Make zsh the default shell for the user.
|
||||||
sed -i "s/^$name:\(.*\):\/bin\/.*/$name:\1:\/bin\/zsh/" /etc/passwd
|
sed -i "s/^$name:\(.*\):\/bin\/.*/$name:\1:\/bin\/zsh/" /etc/passwd
|
||||||
|
|
||||||
# dbus UUID must be generated for Artix runit
|
# dbus UUID must be generated for Artix runit.
|
||||||
dbus-uuidgen > /var/lib/dbus/machine-id
|
dbus-uuidgen > /var/lib/dbus/machine-id
|
||||||
|
|
||||||
# Let LARBS know the WM it's supposed to run.
|
# Let LARBS know the WM it's supposed to run.
|
||||||
|
Loading…
Reference in New Issue
Block a user