Skip to content

Commit

Permalink
Update common.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
ale5000-git authored Oct 17, 2024
1 parent bea008b commit 901219e
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions includes/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1223,6 +1223,8 @@ init_cmdline()

if test "${SHELL_EXE}" = '/bin/zsh'; then
set -x
else
return 0
fi
test "${IS_BUSYBOX:?}" = 'false' || __TITLE_CMD_PREFIX='busybox '
__TITLE_CMD_0="$(basename "${0:--}" || printf '%s' "${0:--}")"
Expand All @@ -1249,9 +1251,12 @@ fi

# Set environment variables
UTILS_DIR="${MAIN_DIR:?}/utils"
echo "${UTILS_DIR:?}"
UTILS_DATA_DIR="${UTILS_DIR:?}/data"
readonly UTILS_DIR UTILS_DATA_DIR
echo "${UTILS_DIR:?}"
export UTILS_DIR UTILS_DATA_DIR
echo "${UTILS_DIR:?}"

# Set the path of Android SDK if not already set
if test -z "${ANDROID_SDK_ROOT-}"; then
Expand All @@ -1267,6 +1272,7 @@ fi
fi
fi

echo "${UTILS_DIR:?}"
if test -n "${ANDROID_SDK_ROOT-}"; then
if test -n "${CYGPATH?}"; then
# Only on Bash under Windows
Expand All @@ -1288,10 +1294,12 @@ fi
fi
fi

echo "${UTILS_DIR:?}"
if test "${PLATFORM:?}" = 'win'; then
export BB_OVERRIDE_APPLETS='; make'
fi

echo "${UTILS_DIR:?}"
if command 1> /dev/null 2>&1 -v 'alias'; then
alias 'dir'='ls'
alias 'cd..'='cd ..'
Expand All @@ -1303,22 +1311,26 @@ fi
fi
alias 'clear-prev'="printf '\033[A\33[2K\033[A\33[2K\r'"

echo "${UTILS_DIR:?}"
if test -f "${MAIN_DIR:?}/includes/custom-aliases.sh"; then
# shellcheck source=/dev/null
. "${MAIN_DIR:?}/includes/custom-aliases.sh" || ui_error 'Unable to source includes/custom-aliases.sh'
fi

echo "${UTILS_DIR:?}"
alias 'build'='build.sh'
alias 'cmdline'='cmdline.sh'
if test "${PLATFORM:?}" = 'win'; then
alias 'gradlew'='gradlew.bat'
alias 'start'='start.sh'
fi

echo "${UTILS_DIR:?}"
alias 'bits-info'="bits-info.sh"
alias 'help'='help.sh'
fi

echo "${UTILS_DIR:?}"
add_to_path_env "${UTILS_DIR:?}"
add_to_path_env "${MAIN_DIR:?}"
PATH="%builtin${PATHSEP:?}${PATH-}"
Expand Down

0 comments on commit 901219e

Please sign in to comment.