index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-04-22 23:13:20 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-04-23 00:05:12 +0200 |
commit | 563103068d7b669227d3794eec3b5e32b7b124d6 (patch) | |
tree | 26f8775f3ec2ef2f4b2f926e50a127ac8e93709b /conf | |
parent | 8d42512ab208f45a62688dcade6c39f6ca16c430 (diff) |
-rw-r--r-- | conf/.gitignore | 1 | ||||
-rwxr-xr-x | conf/default.conf | 41 |
diff --git a/conf/.gitignore b/conf/.gitignore new file mode 100644 index 0000000..f21e1b2 --- /dev/null +++ b/conf/.gitignore @@ -0,0 +1 @@ +local.conf 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 |