Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2017-07-03 11:18:06 +0200
committerErich Eckner <git@eckner.net>2017-07-03 11:18:06 +0200
commit37278efe090185b497234e75ce90c7980f50d976 (patch)
tree2592cced253b4a1f483a93e8ecf976539d1ef116 /bin
parentf82935542240a54309ba06aec0a444a18c792e68 (diff)
bin/prioritize-build-list new
Diffstat (limited to 'bin')
-rwxr-xr-xbin/prioritize-build-list27
1 files changed, 27 insertions, 0 deletions
diff --git a/bin/prioritize-build-list b/bin/prioritize-build-list
new file mode 100755
index 0000000..20b11ae
--- /dev/null
+++ b/bin/prioritize-build-list
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+. "${0%/*}/../conf/default.conf"
+
+if [ $# -ne 1 ]; then
+ echo 'Usage: prioritize-build-list pkg-regex'
+ echo ' moves packages matching pkg-regex to front of build list'
+ exit 2
+fi
+
+# Create a lock file for build list.
+
+exec 9> "${build_list_lock_file}"
+if ! flock -n 9; then
+ >&2 echo 'come back (shortly) later - I cannot lock build list.'
+ exit 1
+fi
+
+(
+ sed -n "/^$1/p" "${work_dir}/build-list"
+ sed "/^$1/d" "${work_dir}/build-list"
+) | \
+ sponge "${work_dir}/build-list"
+
+# Remove the lock file
+
+rm -f "${build_list_lock_file}"