Browse Source

feat(installer): nicer rsync output (#2067)

kylo252 3 years ago
parent
commit
f7d883b6b9
1 changed files with 4 additions and 5 deletions
  1. 4 5
      utils/installer/install.sh

+ 4 - 5
utils/installer/install.sh

@@ -106,14 +106,13 @@ function main() {
     [ "$answer" != "${answer#[Yy]}" ] && install_rust_deps
     [ "$answer" != "${answer#[Yy]}" ] && install_rust_deps
   fi
   fi
 
 
-  msg "Backing up old LunarVim configuration"
   backup_old_config
   backup_old_config
 
 
   verify_lvim_dirs
   verify_lvim_dirs
 
 
   if [ "$ARGS_LOCAL" -eq 1 ]; then
   if [ "$ARGS_LOCAL" -eq 1 ]; then
     link_local_lvim
     link_local_lvim
-  elif [ -e "$LUNARVIM_BASE_DIR/init.lua" ]; then
+  elif [ -d "$LUNARVIM_BASE_DIR" ]; then
     validate_lunarvim_files
     validate_lunarvim_files
   else
   else
     clone_lvim
     clone_lvim
@@ -287,9 +286,9 @@ function backup_old_config() {
     fi
     fi
     mkdir -p "$dir.bak"
     mkdir -p "$dir.bak"
     touch "$dir/ignore"
     touch "$dir/ignore"
+    msg "Backing up old $dir to $dir.bak"
     if command -v rsync &>/dev/null; then
     if command -v rsync &>/dev/null; then
-      rsync --archive -hh --partial --progress --cvs-exclude \
-        --modify-window=1 "$dir"/ "$dir.bak"
+      rsync --archive -hh --stats --partial --cvs-exclude "$dir"/ "$dir.bak"
     else
     else
       OS="$(uname -s)"
       OS="$(uname -s)"
       case "$OS" in
       case "$OS" in
@@ -305,7 +304,7 @@ function backup_old_config() {
       esac
       esac
     fi
     fi
   done
   done
-  echo "Backup operation complete"
+  msg "Backup operation complete"
 }
 }
 
 
 function clone_lvim() {
 function clone_lvim() {