summaryrefslogtreecommitdiff
path: root/src/bin/db-init
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/db-init')
-rwxr-xr-xsrc/bin/db-init10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/bin/db-init b/src/bin/db-init
index 028ae50..42574a4 100755
--- a/src/bin/db-init
+++ b/src/bin/db-init
@@ -22,11 +22,15 @@ source "${SHARE_DIR}/db-functions"
platforms=("${@:1}")
+db-init_run() {
+ mkdir -p -- "${PKG_MAIN_POOLS}" "${SRC_MAIN_POOLS}" "${CLEANUP_DESTDIR}" "${SOURCE_CLEANUP_DESTDIR}" "${STAGING}"
+}
+
for '_platform' in "${PLATFORMS[@]}"; do
if [ "${#}" -eq '0' ]; then
source "${CONFIG_DIR}/xbs.d/${_platform}.cfg"
- mkdir -p -- "${PKG_MAIN_POOLS}" "${SRC_MAIN_POOLS}" "${CLEANUP_DESTDIR}" "${SOURCE_CLEANUP_DESTDIR}" "${STAGING}"
+ db-init_run
else
for 'platform' in "${platforms[@]}"; do
# Rename ("${plataform}") to easily script usage
@@ -35,11 +39,11 @@ for '_platform' in "${PLATFORMS[@]}"; do
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}"
+ db-init_run
else
die "This %s plataform doesn't exist" "${plataform}"
fi
- donw
+ done
fi
done