Add update.sh, persist Go on PATH via profile.d
update.sh pulls the latest main, rebuilds, reinstalls, and restarts the service in one step. install.sh/bootstrap.sh now also drop /etc/profile.d/go-path.sh so Go stays on PATH in future shells, not just within the running install script. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
f333623035
commit
b2b6b82f58
@@ -49,6 +49,11 @@ if ! command -v go >/dev/null 2>&1; then
|
||||
rm -f /tmp/go.tar.gz
|
||||
fi
|
||||
|
||||
if [[ ! -f /etc/profile.d/go-path.sh ]]; then
|
||||
echo 'export PATH="/usr/local/go/bin:$PATH"' > /etc/profile.d/go-path.sh
|
||||
chmod 0644 /etc/profile.d/go-path.sh
|
||||
fi
|
||||
|
||||
if ! command -v go >/dev/null 2>&1; then
|
||||
echo "go still not found on PATH after install attempt (/usr/local/go/bin)." >&2
|
||||
exit 1
|
||||
|
||||
Reference in New Issue
Block a user