diff options
| author | Nicholas Rodrigues Lordello <[email protected]> | 2023-01-21 09:22:55 +0100 |
|---|---|---|
| committer | Nicholas Rodrigues Lordello <[email protected]> | 2023-12-12 23:30:26 +0100 |
| commit | 6c7eafe67e51ee305cbc791ddcbea11c83bd661c (patch) | |
| tree | 5d64b5ece41f068dfce41c4a16dd485f1384a491 | |
| parent | 2e7f9461dddbcb0f054b9dbd005e6eecd02eb07f (diff) | |
Improve Hare installation script
| -rwxr-xr-x | codespace/hare.sh | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/codespace/hare.sh b/codespace/hare.sh index e780d01..6cf901c 100755 --- a/codespace/hare.sh +++ b/codespace/hare.sh @@ -9,7 +9,11 @@ gitenter() { echo "### $package ###" local src="$PREFIX/build/$1" - git clone "$repo" "$src" + if [[ -d "$src" ]]; then + git -C "$src" pull + else + git clone "$repo" "$src" + fi pushd "$src" } @@ -41,3 +45,10 @@ gitenter hare https://git.sr.ht/~sircmpwn/hare make make install popd + +for bin in $PREFIX/bin/*; do + local linkname="$HOME/.local/bin/$(basename "$bin")" + if [[ ! -e "$linkname" ]]; then + ln -s "$bin" "$linkname" + fi +done |
