pvincent 8 months ago
parent
commit
ebbea8d451
  1. 2
      init.sh
  2. 2
      install.sh
  3. 2
      uninstall.sh

2
init.sh

@ -15,7 +15,7 @@ readonly ORIGINAL="ORIGINAL"
declare -a arr=(/etc/bash.bashrc /etc/inputrc /etc/vim/vimrc)
for i in "${arr[@]}"; do
if [ ! -f "$i.$ORIGINAL" ]; then
if [[ -f "$i" ]] && [[ ! -f "$i.$ORIGINAL" ]]; then
mv "$i" "$i.$ORIGINAL"
basefile=$(basename "$i")
ln -s "$MIAOU_BASH_DIR/$basefile" "$i"

2
install.sh

@ -3,7 +3,7 @@
## CONSTANTS
readonly CURDIR=$PWD
readonly REQUIRED_PKGS=(file git bc)
readonly REQUIRED_PKGS=(file git bc vim)
readonly MAIN_TAR_GZ_URL="https://git.artcode.re/miaou/miaou-bash/archive/main.tar.gz"
## FUNCTIONS

2
uninstall.sh

@ -9,7 +9,7 @@ ORIGINAL="ORIGINAL"
declare -a arr=(/etc/bash.bashrc /etc/inputrc /etc/vim/vimrc)
for i in "${arr[@]}"; do
if [ -f "$i.$ORIGINAL" ]; then
if [[ -f "$i" ]] && [[ -f "$i.$ORIGINAL" ]]; then
echo "uninstalling $i"
rm "$i"
mv "$i.$ORIGINAL" "$i"

Loading…
Cancel
Save