Skip to content

Commit

Permalink
Clean up android and java paths
Browse files Browse the repository at this point in the history
  • Loading branch information
ViViDboarder committed Jun 24, 2024
1 parent b5108d1 commit 62ac80b
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 13 deletions.
14 changes: 9 additions & 5 deletions assets/default/dotfiles/bashrc
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ if [ -d /opt/local ]; then
fi

if [[ "$DET_OS" == "linux" ]]; then
ANDROID_SDK=$HOME/workspace/adt-bundle-linux/sdk
export ANDROID_HOME="$HOME/workspace/adt-bundle-linux/sdk"
GOROOT=/usr/local/go
elif [[ "$DET_OS" == "mac" ]]; then
ANDROID_SDK=$HOME/workspace/android-sdk-macosx
export ANDROID_HOME="$HOME/Library/Android/sdk"

# Set GOPATH
GOROOT=/opt/local/lib/go
Expand All @@ -47,9 +47,13 @@ elif [[ "$DET_OS" == "mac" ]]; then
fi

# Android paths
if [ -d "$ANDROID_SDK" ]; then
export ANDROID_HOME=$ANDROID_SDK
export PATH=$PATH:$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools
if [ -d "$ANDROID_HOME" ]; then
export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
fi

# Java paths
if type /usr/libexec/java_home &> /dev/null ; then
export JAVA_HOME="$(/usr/libexec/java_home)"
fi

# Go paths
Expand Down
14 changes: 9 additions & 5 deletions assets/default/dotfiles/zshrc
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ if [ -d /opt/local ]; then
fi

if [[ "$DET_OS" == "linux" ]]; then
ANDROID_SDK=$HOME/workspace/adt-bundle-linux/sdk
export ANDROID_HOME="$HOME/workspace/adt-bundle-linux/sdk"
elif [[ "$DET_OS" == "mac" ]]; then
ANDROID_SDK=$HOME/workspace/android-sdk-macosx
export ANDROID_HOME="$HOME/Library/Android/sdk"

# Set GOPATH
GOROOT=/opt/local/lib/go
Expand All @@ -47,9 +47,13 @@ elif [[ "$DET_OS" == "mac" ]]; then
fi

# Android paths
if [ -d "$ANDROID_SDK" ]; then
export ANDROID_HOME=$ANDROID_SDK
export PATH=$PATH:$ANDROID_SDK/platform-tools:$ANDROID_SDK/tools
if [ -d "$ANDROID_HOME" ]; then
export PATH=$PATH:$ANDROID_HOME/platform-tools:$ANDROID_HOME/tools
fi

# Java paths
if type /usr/libexec/java_home &> /dev/null ; then
export JAVA_HOME="$(/usr/libexec/java_home)"
fi

# Go paths
Expand Down
12 changes: 9 additions & 3 deletions assets/default/fish/init/paths.fish
Original file line number Diff line number Diff line change
Expand Up @@ -77,10 +77,16 @@ _maybe_set -p PATH "/usr/local/go/bin"
if [ $det_os = "linux" ]
set -gx ANDROID_HOME "$HOME/workspace/adt-bundle-linux/sdk"
else if [ $det_os = "mac" ]
set -gx ANDROID_HOME "$HOME/workspace/android-sdk-macosx"
set -gx ANDROID_HOME "$HOME/Library/Android/sdk"
end
_maybe_set -a PATH "$ANDROID_HOME/tools"
_maybe_set -a PATH "$ANDROID_HOME/tools/bin"
_maybe_set -a PATH "$ANDROID_HOME/platform-tools"

# Java paths
if type -q /usr/libexec/java_home
set -gx JAVA_HOME (/usr/libexec/java_home)
end
_maybe_set -a PATH "$ANDROID_PATH/platform-tools"
_maybe_set -a PATH "$ANDROID_PATH/tools"

# Ruby paths
if type -q rbenv ; and status --is-interactive
Expand Down

0 comments on commit 62ac80b

Please sign in to comment.