ref: simplify download folder check

This commit is contained in:
AJ ONeal
2023-01-15 07:26:54 +00:00
parent 4723810e2b
commit eddef3c24b
+6 -1
View File
@@ -33,10 +33,15 @@ __bootstrap_webi() {
WEBI_UA="$(uname -a)"
WEBI_PKG_DOWNLOAD=""
WEBI_DOWNLOAD_DIR="${HOME}/Downloads"
if [ -n "$(command -v xdg-user-dir)" ] && [ "$(xdg-user-dir DOWNLOAD)" != "$HOME" ]; then
if command -v xdg-user-dir > /dev/null; then
WEBI_DOWNLOAD_DIR="$(xdg-user-dir DOWNLOAD)"
if [ "${WEBI_DOWNLOAD_DIR}" = "${HOME}" ]; then
WEBI_DOWNLOAD_DIR="${HOME}/Downloads"
fi
fi
WEBI_PKG_PATH="${WEBI_DOWNLOAD_DIR}/webi/${PKG_NAME:-error}/${WEBI_VERSION:-latest}"
export WEBI_HOST
##