diff options
Diffstat (limited to 'src/bin')
-rwxr-xr-x | src/bin/db-init | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/src/bin/db-init b/src/bin/db-init index fa989fc..73b467f 100755 --- a/src/bin/db-init +++ b/src/bin/db-init @@ -10,19 +10,23 @@ platforms=("${@:1}") for '_platform' in "${PLATFORMS[@]}"; do if [ "${#}" -eq '0' ]; then - source "${CONFIG_DIR}/xbs.d/${platform}.cfg" + source "${CONFIG_DIR}/xbs.d/${_platform}.cfg" + + mkdir -p -- "${PKG_MAIN_POOLS}" "${SRC_MAIN_POOLS}" "${CLEANUP_DESTDIR}" "${SOURCE_CLEANUP_DESTDIR}" "${STAGING}" else - # Rename ("${plataform}") to easily script usage - _platform_name="${platform/\//+}" _platform_name="${_platforms_name,,}" - - if [ "${_platform_name}" == "${_platform}" ]; then - source "${CONFIG_DIR}/xbs.d/${_platform_name}.cfg" - else - die "This ${plataform} doesn't exist" - fi - fi + for 'platform' in "${platforms[@]}"; do + # Rename ("${plataform}") to easily script usage + _platform_name="${platform/\//+}" _platform_name="${_platforms_name,,}" - mkdir -p -- "${PKG_MAIN_POOLS}" "${SRC_MAIN_POOLS}" "${CLEANUP_DESTDIR}" "${SOURCE_CLEANUP_DESTDIR}" "${STAGING}" + if [ "${_platform_name}" == "${platform}" ]; then + source "${CONFIG_DIR}/xbs.d/${_platform_name}.cfg" + + mkdir -p -- "${PKG_MAIN_POOLS}" "${SRC_MAIN_POOLS}" "${CLEANUP_DESTDIR}" "${SOURCE_CLEANUP_DESTDIR}" "${STAGING}" + else + die "This ${plataform} doesn't exist" + fi + donw + fi done # "${BIN_DIR}/db-repo-add" -p "${_platform}" "${PKG_REPOS[@]}" |