mirror of
https://github.com/spirit-x64/scripts.git
synced 2024-11-23 23:33:10 +03:00
make synchronizing dotfiles optional
This commit is contained in:
parent
84392f19ce
commit
bb200baf86
@ -8,12 +8,14 @@
|
|||||||
|
|
||||||
|
|
||||||
install_doas=1
|
install_doas=1
|
||||||
|
sync_dotfiles=1
|
||||||
|
|
||||||
usage() {
|
usage() {
|
||||||
echo "Usage: $0 [OPTIONS]"
|
echo "Usage: $0 [OPTIONS]"
|
||||||
echo 'Options:'
|
echo 'Options:'
|
||||||
echo ' -h, --help Display this message'
|
echo ' -h, --help Display this message'
|
||||||
echo " --no-doas Don't install doas"
|
echo " --no-doas Don't install doas"
|
||||||
|
echo " --no-sync Don't Sync dotfiles"
|
||||||
}
|
}
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
@ -25,6 +27,9 @@ while [ $# -gt 0 ]; do
|
|||||||
--no-doas)
|
--no-doas)
|
||||||
install_doas=0
|
install_doas=0
|
||||||
;;
|
;;
|
||||||
|
--no-sync)
|
||||||
|
sync_dotfiles=0
|
||||||
|
;;
|
||||||
*)
|
*)
|
||||||
echo "Invalid argument: $1" >&2
|
echo "Invalid argument: $1" >&2
|
||||||
usage
|
usage
|
||||||
@ -52,17 +57,21 @@ 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 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
|
||||||
|
|
||||||
git clone https://github.com/spirit-x64/dotfiles.git
|
if [ sync_dotfiles -eq 1 ]; then
|
||||||
|
$doas xbps-install -y rsync
|
||||||
|
git clone https://github.com/spirit-x64/dotfiles.git
|
||||||
|
rsync -a --exclude='.git/' --exclude='LICENSE' --exclude='.gitignore' dotfiles/ $HOME
|
||||||
|
fi
|
||||||
|
|
||||||
git clone https://github.com/spirit-x64/dwm.git
|
git clone https://github.com/spirit-x64/dwm.git
|
||||||
git clone https://github.com/spirit-x64/dmenu.git
|
git clone https://github.com/spirit-x64/dmenu.git
|
||||||
git clone https://github.com/spirit-x64/st.git
|
git clone https://github.com/spirit-x64/st.git
|
||||||
|
|
||||||
rsync -a --exclude='.git/' --exclude='LICENSE' --exclude='.gitignore' dotfiles/ $HOME
|
|
||||||
|
|
||||||
cd dwm
|
cd dwm
|
||||||
$doas make clean install
|
$doas make clean install
|
||||||
|
Loading…
Reference in New Issue
Block a user