Skip to content

Instantly share code, notes, and snippets.

@stevenkaras
Last active July 10, 2022 19:52
Show Gist options
  • Select an option

  • Save stevenkaras/65c56b86cfc0bcbd79cb0f50d282390a to your computer and use it in GitHub Desktop.

Select an option

Save stevenkaras/65c56b86cfc0bcbd79cb0f50d282390a to your computer and use it in GitHub Desktop.

Revisions

  1. stevenkaras revised this gist Nov 8, 2021. 1 changed file with 18 additions and 0 deletions.
    18 changes: 18 additions & 0 deletions .profile
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,18 @@
    case "$SHELL" in
    *fish)
    [ -f "$HOME/.asdf/asdf.fish" ] && . "$HOME/.asdf/asdf.fish"
    ;;
    *zsh)
    [ -f "$HOME/.asdf/asdf.sh" ] && . "$HOME/.asdf/asdf.sh"
    ;;
    *bash)
    if [ "${BASH:-no}" != no ]; then
    [ -f "$HOME/.asdf/asdf.sh" ] && . "$HOME/.asdf/asdf.sh"
    else
    [ -f "$HOME/.asdf/asdf.posixsh" ] && . "$HOME/.asdf/asdf.posixsh"
    fi
    ;;
    *)
    [ -f "$HOME/.asdf/asdf.posixsh" ] && . "$HOME/.asdf/asdf.posixsh"
    ;;
    esac
  2. stevenkaras revised this gist Nov 8, 2021. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions asdf.posix.sh
    Original file line number Diff line number Diff line change
    @@ -2,8 +2,7 @@

    export ASDF_DIR
    ASDF_DIR="$HOME/.asdf"
    # shellcheck disable=SC2016
    [ -d "$ASDF_DIR" ] || echo '$ASDF_DIR is not a directory'
    [ -d "$ASDF_DIR" ] || echo "$ASDF_DIR is not a directory"

    ASDF_BIN="${ASDF_DIR}/bin"
    ASDF_USER_SHIMS="${ASDF_DATA_DIR:-$HOME/.asdf}/shims"
  3. stevenkaras created this gist Nov 8, 2021.
    17 changes: 17 additions & 0 deletions asdf.posix.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,17 @@
    #!/usr/bin/env sh

    export ASDF_DIR
    ASDF_DIR="$HOME/.asdf"
    # shellcheck disable=SC2016
    [ -d "$ASDF_DIR" ] || echo '$ASDF_DIR is not a directory'

    ASDF_BIN="${ASDF_DIR}/bin"
    ASDF_USER_SHIMS="${ASDF_DATA_DIR:-$HOME/.asdf}/shims"

    # add to front of $PATH
    PATH="${ASDF_BIN}:$PATH"
    PATH="${ASDF_USER_SHIMS}:$PATH"

    # shellcheck source=lib/asdf.sh
    # Load the asdf wrapper function
    . "${ASDF_DIR}/lib/asdf.sh"