summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAbouzar Parvan <[email protected]>2021-08-31 12:27:57 +0430
committerGitHub <[email protected]>2021-08-31 12:27:57 +0430
commit294ed3684a76af1c3d983ebc8bfe62ef90f4f632 (patch)
tree8bb531aac893a7c91f25660a2347c175614b743a
parentb721178a248e5287a73bfa985ab8035af100a814 (diff)
fix the installer issue in master (#1435)
-rwxr-xr-xutils/installer/install.sh14
1 files changed, 13 insertions, 1 deletions
diff --git a/utils/installer/install.sh b/utils/installer/install.sh
index c39f6c8e..ec9813cf 100755
--- a/utils/installer/install.sh
+++ b/utils/installer/install.sh
@@ -210,11 +210,23 @@ function backup_old_config() {
# we create an empty folder for subsequent commands \
# that require an existing directory
mkdir -p "$dir" "$dir.bak"
+ touch "$dir/ignore"
if command -v rsync &>/dev/null; then
rsync --archive -hh --partial --progress --cvs-exclude \
--modify-window=1 "$dir"/ "$dir.bak"
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
done
echo "Backup operation complete"