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

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