Created
December 29, 2022 22:37
-
-
Save jnbek/9e7f2982b248f1397a2c4ad34ff45400 to your computer and use it in GitHub Desktop.
an old bash install script for my dotfiles and stuff
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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