index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
-rwxr-xr-x | conf/default.conf | 41 |
diff --git a/conf/default.conf b/conf/default.conf new file mode 100755 index 0000000..1517272 --- /dev/null +++ b/conf/default.conf @@ -0,0 +1,41 @@ +#!/bin/bash + +# set up some common variables + +set -e + +base_dir="$(dirname "$(readlink -f "$0")")/.." + +work_dir="${base_dir}/work" + +declare -A repo_paths +repo_paths["packages"]="${work_dir}/repos/packages" +repo_paths["community"]="${work_dir}/repos/community" +repo_paths["archlinux32"]="${work_dir}/repos/packages32" + +lock_file="/tmp/${0##*/}.lock" + +# possibly pull in custom modifications + +[ -r "${base_dir}/conf/local.conf" ] && . "${base_dir}/conf/local.conf" + +# check / set up environment + +mkdir -p "${work_dir}" +touch "${work_dir}/build-list" +touch "${work_dir}/deletion-list" + +for repo in "${!repo_paths[@]}"; do + + mkdir -p "${repo_paths["${repo}"]%/*}" + + if ! git -C "${repo_paths["${repo}"]}" status &> /dev/null; then + if [ "${repo}" == "packages32" ]; then + repo_source='git@github.com:archlinux32/packages.git' + else + repo_source="git://git.archlinux.org/svntogit/${repo}.git" + fi + git clone "${repo_source}" "${repo_paths["${repo}"]}" + fi + +done |