Fix BSD portability issues in install script

This commit is contained in:
Lara 2020-07-27 12:46:29 -04:00
parent c73b38fe1c
commit 8fe09dc6e8

View file

@ -41,6 +41,6 @@ mkdir -p "$XDG_CONFIG_HOME"
mkdir -p "$XDG_DATA_HOME" mkdir -p "$XDG_DATA_HOME"
# https://github.com/koalaman/shellcheck/wiki/SC2156 # https://github.com/koalaman/shellcheck/wiki/SC2156
find "$RC_PATH/$CONF_DIR" -mindepth 1 -maxdepth 1 -type d \ find "$RC_PATH/$CONF_DIR" -mindepth 1 -maxdepth 1 -type d \
-exec sh -c 'ln -s -t "$1" "$2" 2> /dev/null || ( link="$1/$(basename "$2")"; test -L "$link" || >&2 echo "Folder $link exists. Keeping old version.")' _ "$XDG_CONFIG_HOME" '{}' \; -exec sh -c 'ln -s "$2" "$1" 2> /dev/null || ( link="$1/$(basename "$2")"; test -L "$link" || >&2 echo "Folder $link exists. Keeping old version.")' _ "$XDG_CONFIG_HOME" '{}' \;
find "$RC_PATH/$DATA_DIR" -mindepth 1 -maxdepth 1 -type d \ find "$RC_PATH/$DATA_DIR" -mindepth 1 -maxdepth 1 -type d \
-exec sh -c 'ln -s -t "$1" "$2" 2> /dev/null || ( link="$1/$(basename "$2")"; test -L "$link" || >&2 echo "Folder $link exists. Keeping old version.")' _ "$XDG_DATA_HOME" '{}' \; -exec sh -c 'ln -s "$2" "$1" 2> /dev/null || ( link="$1/$(basename "$2")"; test -L "$link" || >&2 echo "Folder $link exists. Keeping old version.")' _ "$XDG_DATA_HOME" '{}' \;