Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/get-assignment
diff options
context:
space:
mode:
Diffstat (limited to 'bin/get-assignment')
-rwxr-xr-xbin/get-assignment8
1 files changed, 4 insertions, 4 deletions
diff --git a/bin/get-assignment b/bin/get-assignment
index 7b0a5da..8adcdbf 100755
--- a/bin/get-assignment
+++ b/bin/get-assignment
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
# receive one package to be built from the build-list whose dependencies
# are already satisfied or which breaks a dependency cycle
@@ -31,7 +31,7 @@ hand_out_assignment() {
# we don't care anymore if an older version of this package was
# "locked" or "broken" (we keep only marker for older "done" packages)
ls "${work_dir}/package-states" | \
- grep "^${1//./\\.}\(\.[^.]\+\)\{3\}\.\(locked\|broken\)\$" | \
+ grep "^$(str_to_regex "${1}")\(\.[^.]\+\)\{3\}\.\(locked\|broken\)\$" | \
sed "s|^|${work_dir}/package-states/|" | \
xargs -rn1 rm -f
@@ -39,7 +39,7 @@ hand_out_assignment() {
echo "${slave}" > "${work_dir}/package-states/$1.$2.$3.$4.locked"
# lock every loop this package breaks
- grep "^${1//./\\.}\$" "${work_dir}/build-list.loops/"loop_* | \
+ grep -xF "${1}" "${work_dir}/build-list.loops/"loop_* | \
cut -d: -f1 | \
tee -a "${work_dir}/package-states/$1.$2.$3.$4.locked" | \
sed 's|$|.locked|' | \
@@ -153,7 +153,7 @@ for package in $(
sort -k1nr,1 | \
awk '{print $2}'
); do
- if assignment="$(grep "^${package//./\\.} " "${work_dir}/build-list")"; then
+ if assignment="$(grep "^$(str_to_regex "${package}") " "${work_dir}/build-list")"; then
hand_out_assignment ${assignment}
fi
done