Skip to content

Instantly share code, notes, and snippets.

@jnbek
Created December 29, 2022 22:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jnbek/9e7f2982b248f1397a2c4ad34ff45400 to your computer and use it in GitHub Desktop.
Save jnbek/9e7f2982b248f1397a2c4ad34ff45400 to your computer and use it in GitHub Desktop.
an old bash install script for my dotfiles and stuff
#!/usr/bin/env bash
# Usage: ./install.sh [--no-bak]
# --no-bak erases the .vim/ directory backup, if it exists as a directory.
if [ -d ${HOME}/.vim/ ]; then
mv ${HOME}/.vim $HOME/.vim.bak;
fi;
for i in _*
do
source="${PWD}/$i"
target="${HOME}/${i/_/.}"
ln -fivs ${source} ${target}
done
if [ "$1" = "--no-bak" ]; then
rm -ir ${HOME}/.vim.bak
fi;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment