diff options
author | Luca Matei Pintilie <lucafulger@gmail.com> | 2021-12-21 20:26:50 +0000 |
---|---|---|
committer | Luca Matei Pintilie <lucafulger@gmail.com> | 2021-12-21 20:26:50 +0000 |
commit | f8acb4edc93d2570856381eb7fb6f75db3955cf6 (patch) | |
tree | d8db466f88799f7d796e0b93d6a2ad8394c599c9 /bootstrap.sh | |
parent | 2169a4155362a7f1639e4ad78033abb193f2d565 (diff) | |
download | dotfiles-f8acb4edc93d2570856381eb7fb6f75db3955cf6.tar dotfiles-f8acb4edc93d2570856381eb7fb6f75db3955cf6.tar.gz dotfiles-f8acb4edc93d2570856381eb7fb6f75db3955cf6.tar.bz2 dotfiles-f8acb4edc93d2570856381eb7fb6f75db3955cf6.tar.lz dotfiles-f8acb4edc93d2570856381eb7fb6f75db3955cf6.tar.xz dotfiles-f8acb4edc93d2570856381eb7fb6f75db3955cf6.tar.zst dotfiles-f8acb4edc93d2570856381eb7fb6f75db3955cf6.zip |
Initial commit2
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-x | bootstrap.sh | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/bootstrap.sh b/bootstrap.sh new file mode 100755 index 0000000..671b2a2 --- /dev/null +++ b/bootstrap.sh @@ -0,0 +1,49 @@ +#!/usr/bin/env sh + +SYMLINKDIR=(readlink -f "$0") +BASEDIR=$(dirname "$SYMLINKDIR") +cd $BASEDIR + +source /etc/os-release + +read -p "Install dependencies? (y/n) " -n 1; +echo ""; +if [[ $REPLY =~ ^[Yy]$ ]]; then + + case $ID in + arch) + sudo pacman -S picom xorg-setxkbmap feh xorg-xinput dash imlib2 xorg-xsetroot alacritty flameshot rofi xorg-xbacklight pamixer playerctl xsecurelock git base rsync + ;; + void) + sudo xbps-install -S picom xorg-setxkbmap feh xorg-xinput dash imlib2 xorg-xsetroot alacritty flameshot rofi xorg-xbacklight pamixer playerctl xsecurelock git rsync + ;; + *) + echo "You'll have to install the dependencies yourself" + ;; + esac + +fi; + +git pull origin main; + +function doIt() { + git clone https://github.com/NvChad/NvChad.git ~/.config/nvim + rsync --exclude ".git/" \ + --exclude ".DS_Store" \ + --exclude ".osx" \ + --exclude "bootstrap.sh" \ + --exclude "README.md" \ + --exclude "LICENSE.md" \ + -avh --no-perms ./.config/ ~/.config +} + +if [ "$1" == "--force" -o "$1" == "-f" ]; then + doIt; +else + read -p "This may overwrite existing files in your home directory. Are you sure? (y/n) " -n 1; + echo ""; + if [[ $REPLY =~ ^[Yy]$ ]]; then + doIt; + fi; +fi; +unset doIt; |