Bash-script referring to location of itself


user@host:~/dotfiles$ cat create_bash_links.sh
 #!/bin/bash
 #
 # Creates symlinks in ~ to the bash files in this folder
 #
 SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
 ln -svi ${SCRIPTPATH}/bashrc ~/.bashrc
 ln -svi ${SCRIPTPATH}/bash_profile ~/.bash_profile
 ln -svi ${SCRIPTPATH}/bash_aliases ~/.bash_aliases
,

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.