From a659f281efe457c5a2a232e23996a03b9f636d52 Mon Sep 17 00:00:00 2001 From: Tyler Brazier Date: Wed, 5 Apr 2023 18:59:58 -0600 Subject: [PATCH] install.sh: copy instead of symlinks This is only because termux .shortcuts can't be symlinks: https://github.com/termux/termux-widget/issues/57 I don't want to symlink everything else and make an exception for these because it would be inconsistent and confusing. --- install.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/install.sh b/install.sh index a8b04f5..2c770df 100755 --- a/install.sh +++ b/install.sh @@ -4,14 +4,14 @@ cd "$(dirname "$0")" || exit echo "Press y or n:" for f in $(git ls-files); do - [[ "$f" =~ readme|install.sh ]] && continue + [[ $f =~ readme|install.sh ]] && continue - REPLY=; until [[ "$REPLY" =~ [ynYN] ]]; do + REPLY=; until [[ $REPLY =~ [ynYN] ]]; do read -rn1 -p "$f? "; echo done - [[ "$REPLY" =~ [nN] ]] && continue + [[ $REPLY =~ [nN] ]] && continue - [[ "$f" == */* ]] && mkdir -p "$HOME/.${f%/*}" - ln -sf "$PWD/$f" "$HOME/.$f" + [[ $f == */* ]] && mkdir -p "$HOME/.${f%/*}" + cp "$PWD/$f" "$HOME/.$f" done