mirror of
https://github.com/LunarVim/LunarVim.git
synced 2024-09-21 02:55:09 +02:00
fix the installer issue in master (#1435)
This commit is contained in:
parent
b721178a24
commit
294ed3684a
1 changed files with 13 additions and 1 deletions
|
@ -210,11 +210,23 @@ function backup_old_config() {
|
||||||
# we create an empty folder for subsequent commands \
|
# we create an empty folder for subsequent commands \
|
||||||
# that require an existing directory
|
# that require an existing directory
|
||||||
mkdir -p "$dir" "$dir.bak"
|
mkdir -p "$dir" "$dir.bak"
|
||||||
|
touch "$dir/ignore"
|
||||||
if command -v rsync &>/dev/null; then
|
if command -v rsync &>/dev/null; then
|
||||||
rsync --archive -hh --partial --progress --cvs-exclude \
|
rsync --archive -hh --partial --progress --cvs-exclude \
|
||||||
--modify-window=1 "$dir"/ "$dir.bak"
|
--modify-window=1 "$dir"/ "$dir.bak"
|
||||||
else
|
else
|
||||||
cp -R "$dir/"* "$dir.bak/."
|
OS="$(uname -s)"
|
||||||
|
case "$OS" in
|
||||||
|
Linux)
|
||||||
|
cp -r "$dir/"* "$dir.bak/."
|
||||||
|
;;
|
||||||
|
Darwin)
|
||||||
|
cp -R "$dir/"* "$dir.bak/."
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
echo "OS $OS is not currently supported."
|
||||||
|
;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
echo "Backup operation complete"
|
echo "Backup operation complete"
|
||||||
|
|
Loading…
Reference in a new issue