dotfiles

Yes, my $HOME has a git repo now :(

git clone git://git.shimmy1996.com/dotfiles.git

bigmod (1023B)

    1 #!/usr/bin/env bash
    2 # Inspired by LARBS (https://larbs.xyz) by Luke Smith <luke@lukesmith.xyz>
    3 # License: GNU GPLv3
    4 
    5 [ -z "$dotfilesrepo" ] && dotfilesrepo="ssh://gitea@git.shimmy1996.com:4869/shimmy1996/dotfiles.git"
    6 
    7 [ -z "$name" ] && name=shimmy
    8 
    9 putgitrepo() { # Downlods a gitrepo $1 and places the files in $2 only overwriting conflicts
   10     dialog --infobox "Downloading and installing config files..." 4 60
   11     dir=$(mktemp -d)
   12     chown -R "$name":wheel "$dir"
   13     sudo -u "$name" git clone --depth 1 "$1" "$dir/gitrepo" >/dev/null 2>&1 &&
   14         sudo -u "$name" mkdir -p "$2" &&
   15         sudo -u "$name" cp -rfT "$dir"/gitrepo "$2"
   16 }
   17 
   18 # Install the dotfiles in the user's home directory
   19 putgitrepo "$dotfilesrepo" "/home/$name" || error "Programs have installed, but dotfiles failed to deploy."
   20 
   21 # Bootstrap vimplug.
   22 curl -fLo "/home/$name/.local/share/nvim/site/autoload/plug.vim" --create-dirs \
   23     "https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim"
   24 
   25 dialog --infobox "BIGMOD deployed." 3 20