index : builder | |
Archlinux32 build system | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2017-06-15 15:20:39 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2017-06-15 15:20:39 +0200 |
commit | 5b49e70d5606f36667a55291d5345e95d42674fd (patch) | |
tree | c4b7ea9958c2cc4a7300d318b5386e9b8db6d1b6 /bin/get-assignment | |
parent | 2c4bd582619e6ab73d613b000128886232dbafc9 (diff) |
-rwxr-xr-x | bin/get-assignment | 8 |
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 |