aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorAlec Goncharow <alec@goncharow.dev>2023-12-14 18:06:22 -0500
committerAlec Goncharow <alec@goncharow.dev>2023-12-14 18:06:22 -0500
commit16234cf74ac878d07cde2a88baf79d1c17f18fec (patch)
treef2f09e11dc76e1841e2ae920cddb2c95cbc41599 /bin
parentee836c43ceb5e9d58cfcb4dc5c330296627cefe9 (diff)
sync
Diffstat (limited to 'bin')
-rwxr-xr-xbin/zigup11
1 files changed, 4 insertions, 7 deletions
diff --git a/bin/zigup b/bin/zigup
index eb7bb1a..20bc032 100755
--- a/bin/zigup
+++ b/bin/zigup
@@ -118,18 +118,16 @@ main() {
# zigup shell setup
# affix colons on either side of $PATH to simplify matching
case ":${PATH}:" in
- *:"$HOME/.zig/bin":*)
+ *:"'"$zig_root"'/bin":*)
;;
*)
- # Prepending path in case a system-installed rustc needs to be overridden
export PATH='"$zig_root/"'bin:"$PATH"
;;
esac
case ":${PATH}:" in
- *:"$HOME/.zig/zig":*)
+ *:"'"$zig_root"'/zig":*)
;;
*)
- # Prepending path in case a system-installed rustc needs to be overridden
export PATH='"$zig_root/"'zig:"$PATH"
;;
esac
@@ -162,9 +160,8 @@ esac
installed_zig_version="no zig installed"
fi
- echo $force
- if [[ ! $force && "$installed_zig_version" == "$zig_master_version" ]]; then
- echo "zig up to date,"
+ if [[ $force == 0 && "$installed_zig_version" == "$zig_master_version" ]]; then
+ echo "zig up to date"
exit 0
else
echo "zig upgrade avaliable: $installed_zig_version -> $zig_master_version"