From 9d12f281f74ccca638c1c1bf009d3bd94a641617 Mon Sep 17 00:00:00 2001 From: fbt Date: Mon, 2 Feb 2015 03:12:58 +0300 Subject: [PATCH] new scheme --- builder-chroot.cfg.sh | 42 ------------------------------------------ builder-chroot.sh | 15 +++++++++++---- 2 files changed, 11 insertions(+), 46 deletions(-) diff --git a/builder-chroot.cfg.sh b/builder-chroot.cfg.sh index f555d7a..67f9782 100755 --- a/builder-chroot.cfg.sh +++ b/builder-chroot.cfg.sh @@ -7,45 +7,3 @@ cfg_repos_dir="$HOME/public" cfg_chroot_dir="/tmp/chroot/build" export GIT_DIR='.git' - -cfg_repos=( 'spark' 'spark-extra' 'spark-termite' 'spark-testing' ) - -cfg_packages=( - 'spark:spark-base' - 'spark:spark-rc' - 'spark:sinit-spark' - 'spark:smdev' - 'spark:watchman-sm' - 'spark:watchman-sm-services-git' - 'spark:xorg-noudev-conf' - - 'spark-extra:package-query' - 'spark-extra:zpac' - - 'spark-extra:eudev' - - 'spark-extra:libsystemd-standalone' - 'spark-extra:systemd-dummy' - 'spark-extra:uselessd' - 'spark-extra:loginkit-git' - - 'spark-extra:scron' - 'spark-extra:sdhcp' - 'spark-extra:chromium-pepper-flash' - 'spark-extra:freshplayerplugin' - 'spark-extra:sinit-sysvcompat' - - 'spark-extra:posh' - 'spark-extra:loksh' - - 'spark-extra:teamviewer9' - 'spark-extra:teamviewer' - - 'spark-testing:uselessd' - 'spark-testing:loginkit-git' - 'spark-testing:libsysdev' - 'spark-testing:xf86-input-evdev-libsysdev' - - 'spark-termite:vte3-select-text' - 'spark-termite:termite' -) diff --git a/builder-chroot.sh b/builder-chroot.sh index 2933549..e91c961 100755 --- a/builder-chroot.sh +++ b/builder-chroot.sh @@ -6,9 +6,12 @@ err() { echo "$1" >&2; } build_pkg() { local makepkg_output makepkg_exit_code makepkg_status + repo="$1" + package="$2" + IFS=':' read repo package <<< "$1" - [[ -d "${cfg_build_dir}/${package}" ]] || { + [[ -d "${cfg_build_dir}/repos/${repo}/${package}" ]] || { err "Package ${package} doesn't exist in ${cfg_build_dir}" return 1 } @@ -22,15 +25,19 @@ build_pkg() { echo -n "Building ${package}... " - cd "${cfg_build_dir}/${package}" + cd "${cfg_build_dir}/repos/${repo}/${package}" sudo /usr/local/bin/makepkg-chroot.sh "${cfg_build_dir}/${package}.chroot" "${cfg_repos_dir}/${repo}" } main() { source 'builder-chroot.cfg.sh' - for i in "${cfg_packages[@]}"; do - build_pkg "$i" + for i in "${cfg_build_dir}/repos"/*; do + repo_name="${i##*/}" + + for r in "$i"/*; do + build_pkg "$i" "${r##*/}" + done done for i in "${cfg_repos[@]}"; do