summaryrefslogtreecommitdiff
path: root/src/bin/db-init
diff options
context:
space:
mode:
Diffstat (limited to 'src/bin/db-init')
-rw-r--r--[-rwxr-xr-x]src/bin/db-init34
1 files changed, 3 insertions, 31 deletions
diff --git a/src/bin/db-init b/src/bin/db-init
index 42574a4..624fb7f 100755..100644
--- a/src/bin/db-init
+++ b/src/bin/db-init
@@ -1,5 +1,5 @@
#!/bin/bash
-# Creates the repository structure defined in config
+# X Build System
# Copyright (C) 2012-2015 Parabola Hackers <https://www.parabola.nu>
# This program is free software: you can redistribute it and/or modify
@@ -17,34 +17,6 @@
CONFIG_DIR="$(dirname "$(readlink -e "$0")")/etc"
-source "${CONFIG_DIR}/xbs.cfg"
-source "${SHARE_DIR}/db-functions"
+FLAGS=("${@}")
-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"
-
- db-init_run
- else
- for 'platform' in "${platforms[@]}"; do
- # 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"
-
- db-init_run
- else
- die "This %s plataform doesn't exist" "${plataform}"
- fi
- done
- fi
-done
-
-# "${BIN_DIR}/db-repo-add" -p "${_platform}" "${PKG_REPOS[@]}"
+RUN_DIR="xbs init ${FLAGS[@]}"