Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion simplexup/install
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
6 changes: 3 additions & 3 deletions simplexup/simplexup
Original file line number Diff line number Diff line change
Expand Up @@ -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"}
Expand Down Expand Up @@ -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
}

Expand Down