Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/env bash
- set -x
- if [ "$(readlink -f "$(basename "$0")")" = "${HOME}/.config/bash/init.sh" ]; then
- for config in 'bash_profile' 'bashrc'; do
- if [ -f "${HOME}/.${config}" ]; then
- mv "${HOME}/.${config}" "${HOME}/.${config}.bak"
- ln -s "${HOME}/.config/bash/${config}" "${HOME}/.${config}"
- fi
- done
- else echo -e "Not in the correct working directory! You should clone/extract "bash_config" to the directory ~/.config/bash, and run this script from there!" && exit 1;
- fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement