You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
455 B

1 year ago
  1. #!/bin/bash
  2. set -Eeuo pipefail
  3. #remove /etc/skel/.bashrc
  4. if [ -e /etc/skel/.bashrc ]; then
  5. rm /etc/skel/.bashrc
  6. fi
  7. ORIGINAL="ORIGINAL"
  8. declare -a arr=(/etc/bash.bashrc /etc/inputrc /etc/vim/vimrc)
  9. for i in "${arr[@]}"; do
  10. if [ ! -f "$i.$ORIGINAL" ]; then
  11. echo "$i needs installation $(basename $i)"
  12. mv "$i" "$i.$ORIGINAL"
  13. ln -s "$CURDIR/$(basename $i)" "$i"
  14. else
  15. echo "<$i> already overriden!"
  16. fi
  17. done