diff options
| author | Lee Marlow <[email protected]> | 2021-08-27 13:46:11 -0600 | 
|---|---|---|
| committer | GitHub <[email protected]> | 2021-08-28 00:16:11 +0430 | 
| commit | 21d04257a8c306fbb0c17486791bc46d6212e611 (patch) | |
| tree | 8cd848e8c9a490566dff2893b6ae552e8d31ae43 /utils/installer | |
| parent | 23952f14437be39056b1e89436e8aea76dfbb61d (diff) | |
[Feature] Fetch from git before update in install script (#1409)
Diffstat (limited to 'utils/installer')
| -rwxr-xr-x | utils/installer/install.sh | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/utils/installer/install.sh b/utils/installer/install.sh index 4392635d..9e198274 100755 --- a/utils/installer/install.sh +++ b/utils/installer/install.sh @@ -211,7 +211,7 @@ function backup_old_config() {      # that require an existing directory      mkdir -p "$dir" "$dir.bak"      if command -v rsync &>/dev/null; then -      rsync --archive -hh --partial --progress \ +      rsync --archive -hh --partial --progress --cvs-exclude \          --modify-window=1 "$dir"/ "$dir.bak"      else        cp -R "$dir/*" "$dir.bak/." @@ -273,8 +273,9 @@ function setup_lvim() {  }  function update_lvim() { -  if ! git -C "$LUNARVIM_RUNTIME_DIR/lvim" status -uno &>/dev/null; then -    git -C "$LUNARVIM_RUNTIME_DIR/lvim" pull --ff-only --progress || +  git -C "$LUNARVIM_RUNTIME_DIR/lvim" fetch --quiet +  if ! git -C "$LUNARVIM_RUNTIME_DIR/lvim" diff --quiet "@{upstream}"; then +    git -C "$LUNARVIM_RUNTIME_DIR/lvim" merge --ff-only --progress ||        echo "Unable to guarantee data integrity while updating. Please do that manually instead." && exit 1    fi    echo "Your LunarVim installation is now up to date!" | 
