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.

23 lines
532 B

5 years ago
  1. #!/bin/bash
  2. # https://github.com/amix/vimrc/raw/master/vimrcs/basic.vim
  3. [ `id -u` -ne 0 ] && echo 'root privilege required' && exit 1
  4. BASEDIR=$PWD
  5. [ ! $BASEDIR == '/opt/debian-bash' ] && echo 'should be installed in /opt/debian-bash directory' && exit 1
  6. ORIGINAL="ORIGINAL"
  7. declare -a arr=(/etc/bash.bashrc /etc/inputrc /etc/vim/vimrc)
  8. for i in "${arr[@]}"
  9. do
  10. if [ -f "$i.$ORIGINAL" ]; then
  11. echo "uninstalling $i"
  12. rm "$i"
  13. mv "$i.$ORIGINAL" "$i"
  14. else
  15. echo "$i" not overriden
  16. fi
  17. done