summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rw-r--r--conf/.gitignore1
-rwxr-xr-xconf/default.conf41
2 files changed, 42 insertions, 0 deletions
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