summaryrefslogtreecommitdiff
path: root/conf
diff options
context:
space:
mode:
Diffstat (limited to 'conf')
-rwxr-xr-xconf/default.conf22
1 files changed, 12 insertions, 10 deletions
diff --git a/conf/default.conf b/conf/default.conf
index 1f75bd9..4f4697b 100755
--- a/conf/default.conf
+++ b/conf/default.conf
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# set up some common variables
@@ -6,7 +6,7 @@ set -e
export LANG=C
# dirty hack to get this stuff debugable from a bash
-if [ "x$0" = "x-bash" ] || [ "x$0" = "xbash" ]; then
+if [ "x$0" = "x-bash" ] || [ "x$0" = "xbash" ] || [ "x$0" = "xdash" ]; then
base_dir="$(pwd)"
else
base_dir="$(dirname "$(readlink -f "$0")")/.."
@@ -16,10 +16,10 @@ fi
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"
+repo_names='packages community archlinux32'
+repo_paths__packages="${work_dir}/repos/packages"
+repo_paths__community="${work_dir}/repos/community"
+repo_paths__archlinux32="${work_dir}/repos/packages32"
master_build_server="master.build.server"
master_build_server_port="22"
@@ -51,17 +51,19 @@ touch "${work_dir}/build-list"
touch "${work_dir}/deletion-list"
mkdir -p "${work_dir}/build-list.loops"
-for repo in "${!repo_paths[@]}"; do
+for repo in ${repo_names}; do
- mkdir -p "${repo_paths["${repo}"]%/*}"
+ eval repo_path='$repo_paths__'"${repo}"
- if [ ! -d "${repo_paths["${repo}"]}/.git" ]; then
+ mkdir -p "${repo_path%/*}"
+
+ if [ ! -d "${repo_path}/.git" ]; then
if [ "${repo}" = "archlinux32" ]; 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}"]}"
+ git clone "${repo_source}" "${repo_path}"
fi
done