Add Unix installer PATH setup
This commit is contained in:
+15
@@ -183,6 +183,21 @@ EOF
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$role" = "client" ] || [ "$role" = "both" ]; then
|
if [ "$role" = "client" ] || [ "$role" = "both" ]; then
|
||||||
|
case ":$PATH:" in
|
||||||
|
*":$bindir:"*) ;;
|
||||||
|
*)
|
||||||
|
if [ "$(uname -s)" = "Darwin" ] || [ "$(basename "${SHELL:-}")" = "zsh" ]; then
|
||||||
|
shell_rc="$HOME/.zshrc"
|
||||||
|
else
|
||||||
|
shell_rc="$HOME/.profile"
|
||||||
|
fi
|
||||||
|
mkdir -p "$(dirname "$shell_rc")"
|
||||||
|
if [ ! -f "$shell_rc" ] || ! grep -F "$bindir" "$shell_rc" >/dev/null 2>&1; then
|
||||||
|
printf '\nexport PATH="%s:$PATH"\n' "$bindir" >>"$shell_rc"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
client_config="$config_dir/client.toml"
|
client_config="$config_dir/client.toml"
|
||||||
if [ "$force_config" -eq 1 ] || [ ! -f "$client_config" ]; then
|
if [ "$force_config" -eq 1 ] || [ ! -f "$client_config" ]; then
|
||||||
default_server="${server:-user@example.com}"
|
default_server="${server:-user@example.com}"
|
||||||
|
|||||||
Reference in New Issue
Block a user