summaryrefslogtreecommitdiff
path: root/conf/default.conf
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-06-15 15:20:39 +0200
committerErich Eckner <git@eckner.net>2017-06-15 15:20:39 +0200
commit5b49e70d5606f36667a55291d5345e95d42674fd (patch)
treec4b7ea9958c2cc4a7300d318b5386e9b8db6d1b6 /conf/default.conf
parent2c4bd582619e6ab73d613b000128886232dbafc9 (diff)
downloadbuilder-5b49e70d5606f36667a55291d5345e95d42674fd.tar.xz
removed all bashisms - should work in any POSIX shell, now
Diffstat (limited to 'conf/default.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