File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88#
99set -e -u
1010
11+ aur_username=" aurbuild"
12+
13+
1114# Delete file only if file exists
1215# remove <file1> <file2> ...
1316function remove () {
@@ -37,13 +40,13 @@ function user_check () {
3740}
3841
3942# Creating a aur user.
40- if [[ $( user_check aurbuild ) = false ]]; then
41- useradd -m -d " /aurbuild_temp" aurbuild
43+ if [[ $( user_check ${aur_username} ) = false ]]; then
44+ useradd -m -d " /aurbuild_temp" " ${aur_username} "
4245fi
4346mkdir -p " /aurbuild_temp"
4447chmod 700 -R " /aurbuild_temp"
45- chown aurbuild:aurbuild -R " /aurbuild_temp"
46- echo " aurbuild ALL=(ALL) NOPASSWD:ALL" > " /etc/sudoers.d/aurbuild"
48+ chown ${aur_username} : ${aur_username} -R " /aurbuild_temp"
49+ echo " ${aur_username} ALL=(ALL) NOPASSWD:ALL" > " /etc/sudoers.d/aurbuild"
4750
4851# Setup keyring
4952pacman-key --init
You can’t perform that action at this time.
0 commit comments