Skip to content

Commit

Permalink
install.sh: copy instead of symlinks
Browse files Browse the repository at this point in the history
This is only because termux .shortcuts can't be symlinks:
termux/termux-widget#57
I don't want to symlink everything else and make an exception for these
because it would be inconsistent and confusing.
  • Loading branch information
tylerbrazier committed Apr 6, 2023
1 parent 7d9e039 commit a659f28
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit a659f28

Please sign in to comment.