This repository has been archived on 2024-03-28. You can view files and clone it, but cannot push or open issues or pull requests.
2020-11-07 22:23:52 -06:00
|
|
|
#!/usr/bin/env sh
|
2021-03-22 10:47:23 -05:00
|
|
|
|
|
|
|
pacman -Syy
|
|
|
|
|
|
|
|
is_root="$(test "$(whoami)" == 'root' && echo "1" || echo "0")"
|
|
|
|
for file in "$(dirname "$0")/provision.d"/*; do
|
|
|
|
test -d "$file" && continue
|
|
|
|
echo "Runnning $f..."
|
|
|
|
if <<< "$file" grep -q "AS_ROOT"; then
|
|
|
|
if [ "$is_root" == "1" ]; then
|
|
|
|
"$file"
|
|
|
|
else
|
|
|
|
sudo "$file"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
if [ "$is_root" == "1" ]; then
|
|
|
|
sudo -u daniel "$file"
|
|
|
|
else
|
|
|
|
"$file"
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
done
|