summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xutils/installer/install.sh7
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!"