diff --git a/simplexup/install b/simplexup/install index 94003a8..e3c9238 100755 --- a/simplexup/install +++ b/simplexup/install @@ -25,6 +25,10 @@ case $SHELL in PROFILE=$HOME/.bashrc PREF_SHELL=bash ;; +*/fish) + PROFILE=$HOME/.config/fish/config.fish + PREF_SHELL=fish + ;; *) echo "simplexup: could not detect shell, manually add ${SIMPLEX_BIN_DIR} to your PATH." exit 1 @@ -33,7 +37,11 @@ esac # Only add simplexup if it isn't already in PATH. if [[ ":$PATH:" != *":${SIMPLEX_BIN_DIR}:"* ]]; then # Add the simplexup directory to the path and ensure the old PATH variables remain. - echo >> "$PROFILE" && echo "export PATH=\"\$PATH:$SIMPLEX_BIN_DIR\"" >> "$PROFILE" + if [[ "$PREF_SHELL" == "fish" ]]; then + echo >> "$PROFILE" && echo "fish_add_path -a \"$SIMPLEX_BIN_DIR\"" >> "$PROFILE" + else + echo >> "$PROFILE" && echo "export PATH=\"\$PATH:$SIMPLEX_BIN_DIR\"" >> "$PROFILE" + fi fi echo diff --git a/simplexup/simplexup b/simplexup/simplexup index 380804f..369701d 100755 --- a/simplexup/simplexup +++ b/simplexup/simplexup @@ -3,7 +3,7 @@ set -eo pipefail # NOTE: if you make modifications to this script, please increment the version number. # WARNING: the SemVer pattern: major.minor.patch must be followed as we use it to determine if the script is up to date. -SIMPLEXUP_INSTALLER_VERSION="0.0.1" +SIMPLEXUP_INSTALLER_VERSION="0.0.2" BASE_DIR=${XDG_CONFIG_HOME:-$HOME} SIMPLEX_DIR=${SIMPLEX_DIR:-"$BASE_DIR/.simplex"} @@ -439,12 +439,12 @@ detect_platform_arch() { if [ "$(sysctl -n sysctl.proc_translated 2>/dev/null)" = "1" ]; then ARCHITECTURE="arm64" # Rosetta. else - ARCHITECTURE="amd64" # Intel. + ARCHITECTURE="x86_64" # Intel. fi elif [ "${ARCHITECTURE}" = "arm64" ] || [ "${ARCHITECTURE}" = "aarch64" ] ; then ARCHITECTURE="arm64" # Arm. else - ARCHITECTURE="amd64" # Amd. + ARCHITECTURE="x86_64" # Amd. fi }