From 7103b9113ce640ce9500eb5fcf1c33c6e4875ff6 Mon Sep 17 00:00:00 2001 From: Guangxiong Lin Date: Sun, 12 Dec 2021 12:56:36 +0800 Subject: Check before clean package in vim --- bin/vim-pack | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/vim-pack b/bin/vim-pack index 65c7fb4..0a6240e 100755 --- a/bin/vim-pack +++ b/bin/vim-pack @@ -14,7 +14,7 @@ update_package () { if [ ! -d $package_dir ]; then echo "$name : Installing ... " mkdir -p $package_dir - git clone --depth 1 $remote_url $package_dir + git clone --depth 1 $remote_url $package_dir && echo "$name : Done" || echo "$name : FAIL" else cd $package_dir echo "$name : Updating ... " @@ -27,7 +27,7 @@ clean () { for package_name in $(ls $HOME/.vim/pack/vendor/$load_type); do package_dir=$HOME/.vim/pack/vendor/$load_type/$package_name if [[ ! " ${package_dirs[*]} " =~ " ${package_dir} " ]]; then - read -r -p "rm -rf $package_dir? [y/N]: " + read -r -p "rm -rf $package_dir? [y/N]: " response response=${response,,} if [[ "$response" =~ ^(yes|y)$ ]]; then rm -rf $package_dir -- cgit v1.2.3