chown fix

This commit is contained in:
Luke Smith 2020-03-12 16:28:43 -04:00
parent 26e585d159
commit 6dd98e2578
No known key found for this signature in database
GPG Key ID: 4C50B54A911F6252

View File

@ -45,7 +45,7 @@ selectdotfiles() { \
getuserandpass() { \
# 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
repodir="/home/$name/.local/src"; mkdir -p "$repodir"; chown -R "$name:wheel" "$repodir"
repodir="/home/$name/.local/src"; mkdir -p "$repodir"; chown -R "$name":wheel "$repodir"
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)
done
@ -141,7 +141,7 @@ putgitrepo() { # Downloads a gitrepo $1 and places the files in $2 only overwrit
[ -z "$3" ] && branch="master" || branch="$repobranch"
dir=$(mktemp -d)
[ ! -d "$2" ] && mkdir -p "$2"
chown -R "$name:wheel" "$dir" "$2"
chown -R "$name":wheel "$dir" "$2"
sudo -u "$name" git clone -b "$branch" --depth 1 "$1" "$dir" >/dev/null 2>&1
sudo -u "$name" cp -rfT "$dir" "$2"
}
@ -208,7 +208,7 @@ manualinstall $aurhelper || error "Failed to install AUR helper."
# and all build dependencies are installed.
installationloop
dialog --title "LARBS Installation" --infobox "Finally, installing \`libxft-bgra\` to enable color emomis in suckless software without crashes." 5 70
dialog --title "LARBS Installation" --infobox "Finally, installing \`libxft-bgra\` to enable color emoji in suckless software without crashes." 5 70
yes | sudo -u "$name" $aurhelper -S libxft-bgra >/dev/null 2>&1
# Install the dotfiles in the user's home directory
@ -230,7 +230,7 @@ sed -i "s/^$name:\(.*\):\/bin\/.*/$name:\1:\/bin\/zsh/" /etc/passwd
dbus-uuidgen > /var/lib/dbus/machine-id
# Let LARBS know the WM it's supposed to run.
echo "$edition" > "/home/$name/.local/share/larbs/wm"; chown -R "$name:wheel" "/home/$name/.local"
echo "$edition" > "/home/$name/.local/share/larbs/wm"; chown -R "$name":wheel "/home/$name/.local"
# Last message! Install complete!
finalize