diff options
author | Abouzar Parvan <[email protected]> | 2021-08-31 12:24:33 +0430 |
---|---|---|
committer | GitHub <[email protected]> | 2021-08-31 12:24:33 +0430 |
commit | 67a0ee6fddf4c8ce7c5612ce32de684a0683e3ab (patch) | |
tree | e3a6c432d768b29a0649ce91cee54b0e3ef6f235 /utils | |
parent | 86d8d970f55469c4f9b0e130d2dd76e9b2970e96 (diff) |
Fix the installer copy command (#1432)
Diffstat (limited to 'utils')
-rwxr-xr-x | utils/installer/install.sh | 14 |
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" |