mirror of
https://github.com/spirit-x64/scripts.git
synced 2024-11-23 23:33:10 +03:00
make doas optional
This commit is contained in:
parent
9f0d40366d
commit
84392f19ce
@ -6,17 +6,53 @@
|
|||||||
# TODO: setup compositor
|
# TODO: setup compositor
|
||||||
# TODO: install nvidia drivers (if nvidia gpu installed)
|
# TODO: install nvidia drivers (if nvidia gpu installed)
|
||||||
|
|
||||||
|
|
||||||
|
install_doas=1
|
||||||
|
|
||||||
|
usage() {
|
||||||
|
echo "Usage: $0 [OPTIONS]"
|
||||||
|
echo 'Options:'
|
||||||
|
echo ' -h, --help Display this message'
|
||||||
|
echo " --no-doas Don't install doas"
|
||||||
|
}
|
||||||
|
|
||||||
|
while [ $# -gt 0 ]; do
|
||||||
|
case $1 in
|
||||||
|
-h | --help)
|
||||||
|
usage
|
||||||
|
exit 0
|
||||||
|
;;
|
||||||
|
--no-doas)
|
||||||
|
install_doas=0
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "Invalid argument: $1" >&2
|
||||||
|
usage
|
||||||
|
exit 1
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
shift
|
||||||
|
done
|
||||||
|
|
||||||
# update the package manager
|
# update the package manager
|
||||||
sudo xbps-install -Suy xbps
|
sudo xbps-install -Suy xbps
|
||||||
|
|
||||||
# setup doas
|
# setup doas
|
||||||
sudo xbps-install -y opendoas
|
if [ install_doas -eq 1 ]; then
|
||||||
sudo bash -c "echo 'permit nopass $USER as root' > /etc/doas.conf"
|
sudo xbps-install -y opendoas
|
||||||
|
sudo bash -c "echo 'permit nopass $USER as root' > /etc/doas.conf"
|
||||||
|
fi
|
||||||
|
|
||||||
|
if command -v doas &> /dev/null; then
|
||||||
|
doas="doas"
|
||||||
|
else
|
||||||
|
doas="sudo"
|
||||||
|
fi
|
||||||
|
|
||||||
# update conflicted deps
|
# update conflicted deps
|
||||||
doas xbps-install -yu util-linux
|
$doas xbps-install -yu util-linux
|
||||||
# install deps required for setup
|
# install deps required for setup
|
||||||
doas xbps-install -y git rsync make gcc libX11-devel libXft-devel libXinerama-devel xorg-server xinit xauth xorg-fonts xorg-input-drivers pkg-config
|
$doas xbps-install -y git rsync make gcc libX11-devel libXft-devel libXinerama-devel xorg-server xinit xauth xorg-fonts xorg-input-drivers pkg-config
|
||||||
|
|
||||||
mkdir ./.setup-void.temp
|
mkdir ./.setup-void.temp
|
||||||
cd ./.setup-void.temp
|
cd ./.setup-void.temp
|
||||||
@ -29,24 +65,24 @@ git clone https://github.com/spirit-x64/st.git
|
|||||||
rsync -a --exclude='.git/' --exclude='LICENSE' --exclude='.gitignore' dotfiles/ $HOME
|
rsync -a --exclude='.git/' --exclude='LICENSE' --exclude='.gitignore' dotfiles/ $HOME
|
||||||
|
|
||||||
cd dwm
|
cd dwm
|
||||||
doas make clean install
|
$doas make clean install
|
||||||
|
|
||||||
cd ../dmenu
|
cd ../dmenu
|
||||||
doas make clean install
|
$doas make clean install
|
||||||
|
|
||||||
cd ../st
|
cd ../st
|
||||||
doas make clean install
|
$doas make clean install
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
echo 'exec dwm' > $HOME/.xinitrc
|
echo 'exec dwm' > $HOME/.xinitrc
|
||||||
|
|
||||||
# system full-update
|
# system full-update
|
||||||
doas xbps-install -Suy
|
$doas xbps-install -Suy
|
||||||
# install other packages i use
|
# install other packages i use
|
||||||
doas xbps-install -y patch wget curl vim firefox vscode juliaup yt-dlp tree
|
$doas xbps-install -y patch wget curl vim firefox vscode juliaup yt-dlp tree
|
||||||
|
|
||||||
doas ln -s /usr/bin/julialauncher /usr/bin/julia
|
$doas ln -s /usr/bin/julialauncher /usr/bin/julia
|
||||||
|
|
||||||
juliaup self update
|
juliaup self update
|
||||||
juliaup add 1.0.0
|
juliaup add 1.0.0
|
||||||
|
Loading…
Reference in New Issue
Block a user