Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/bin/schedule-for-rebuild
diff options
context:
space:
mode:
authorTasos Sahanidis <tasos@tasossah.com>2024-04-26 00:34:42 +0300
committerTasos Sahanidis <tasos@tasossah.com>2024-04-26 00:34:42 +0300
commit7f16f143bd3661a9420a9ba0646481b5854a1932 (patch)
treeaf3b3fa848e5c15c1bafed34654c2b3324d60e71 /bin/schedule-for-rebuild
parentcd2dc6c244dabe2062755da6d96d7a21ac4be708 (diff)
bin/schedule-for-rebuild: Remove duplicates without sorting
Diffstat (limited to 'bin/schedule-for-rebuild')
-rwxr-xr-xbin/schedule-for-rebuild6
1 files changed, 3 insertions, 3 deletions
diff --git a/bin/schedule-for-rebuild b/bin/schedule-for-rebuild
index d8dae5c..6c9bfbd 100755
--- a/bin/schedule-for-rebuild
+++ b/bin/schedule-for-rebuild
@@ -277,7 +277,7 @@ if [ -s "${tmp_dir}/package-regexes" ]; then
} | \
mysql_run_query | \
tr '\t' ' ' | \
- sort -u \
+ tac | awk '!seen[$0]++' | tac \
>>"${tmp_dir}/pkgbases"
fi
@@ -465,7 +465,7 @@ if ${auto}; then
} \
| mysql_run_query \
| tr '\t' ' ' \
- | sort -u \
+ | tac | awk '!seen[$0]++' | tac \
>>"${tmp_dir}/pkgbases"
fi
@@ -474,7 +474,7 @@ if [ ! -s "${tmp_dir}/pkgbases" ]; then
exit
fi
-sort -u "${tmp_dir}/pkgbases" \
+tac "${tmp_dir}/pkgbases" | awk '!seen[$0]++' | tac \
| sponge "${tmp_dir}/pkgbases"
if ${interactive}; then