Fix variable ordering

This commit is contained in:
2024-10-03 23:47:06 -04:00
parent 952560310a
commit f54273a745

View File

@@ -260,7 +260,8 @@ parse_input() {
declare -ga SERVICES CONTAINERS declare -ga SERVICES CONTAINERS
local long_opts short_opts input local long_opts short_opts input
# Defaults declare -g SCRIPT_PATH; SCRIPT_PATH=$(readlink -f "${BASH_SOURCE[0]}")
declare -g SCRIPT_DIR=; SCRIPT_DIR=$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")
declare -g \ declare -g \
BUILD_TARGET="$ID" \ BUILD_TARGET="$ID" \
REPO_TARGET="$ID" \ REPO_TARGET="$ID" \
@@ -269,12 +270,8 @@ parse_input() {
CREATEREPO_WEBROOT="/var/www/jriver" \ CREATEREPO_WEBROOT="/var/www/jriver" \
USER="${SUDO_USER:-$USER}" USER="${SUDO_USER:-$USER}"
declare -g SCRIPT_PATH; SCRIPT_PATH=$(readlink -f "${BASH_SOURCE[0]}")
declare -g SCRIPT_DIR=; SCRIPT_DIR=$(readlink -f "$(dirname "${BASH_SOURCE[0]}")")
declare -g HOME; HOME=$(getent passwd "$USER" | cut -d: -f6) declare -g HOME; HOME=$(getent passwd "$USER" | cut -d: -f6)
declare -p
# Set some defaults if zero or one arguments are passed # Set some defaults if zero or one arguments are passed
if [[ $# -eq 0 && $ID != "unknown" ]]; then if [[ $# -eq 0 && $ID != "unknown" ]]; then
debug "Automatically setting --install repo" debug "Automatically setting --install repo"