Refactor
This commit is contained in:
parent
49610aff3f
commit
1adb3e109a
|
@ -1,6 +1,6 @@
|
||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
setPermissions() {
|
addUser() {
|
||||||
useradd calbuilder -m
|
useradd calbuilder -m
|
||||||
echo "calbuilder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
echo "calbuilder ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
|
||||||
visudo -c
|
visudo -c
|
||||||
|
@ -102,10 +102,10 @@ getInputs() {
|
||||||
runScript() {
|
runScript() {
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
|
||||||
pacman -Syu --noconfirm base-devel
|
pacman -Syu --needed --noconfirm base-devel
|
||||||
|
|
||||||
getInputs
|
getInputs
|
||||||
setPermissions
|
addUser
|
||||||
|
|
||||||
baseDir="$PWD"
|
baseDir="$PWD"
|
||||||
if [ -n "$pkgDir" ] && [ "$pkgDir" != "." ]; then
|
if [ -n "$pkgDir" ] && [ "$pkgDir" != "." ]; then
|
||||||
|
|
Loading…
Reference in New Issue