commit dc236c38ad0994243a0a6179f3ee86ae66a95e16 parent 59bbafbfe5fea647650c2b2b01a85922aa9256a9 Author: breadcat <breadcat@users.noreply.github.com> Date: Thu, 16 Oct 2025 19:13:25 +0100 Remove duplicates when creating lists Diffstat:
| M | scripts/blog-sort-archives.nix | | | 4 | ++-- |
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/scripts/blog-sort-archives.nix b/scripts/blog-sort-archives.nix @@ -21,7 +21,7 @@ echo -n "Writing movies export... " { printf "%s\n" "$movie_header" - printf "%s\n" "$movies_raw" | paste <( printf "%s\n" "$movies_raw" | sed 's/^\* //' | sed -E 's/^(The|A|An) //I' ) - | sort -f | cut -f2 + printf "%s\n" "$movies_raw" | paste <( printf "%s\n" "$movies_raw" | sed 's/^\* //' | sed -E 's/^(The|A|An) //I' ) - | sort -f | uniq -i | cut -f2 } >"$movies_export" movies_shasum_modified="$(sha512sum "$movies_export" | awk '{print $1}')" if [[ "$movies_shasum_original" != "$movies_shasum_modified" ]]; then @@ -37,7 +37,7 @@ echo -n "Writing TV shows export... " { printf "%s\n" "$tvshows_header" - printf "%s\n" "$tvshows_raw" | paste <( printf "%s\n" "$tvshows_raw" | sed 's/^\* //' | sed -E 's/^(The|A|An) //I' ) - | sort -f | cut -f2 + printf "%s\n" "$tvshows_raw" | paste <( printf "%s\n" "$tvshows_raw" | sed 's/^\* //' | sed -E 's/^(The|A|An) //I' ) - | sort -f | uniq -i | cut -f2 } >"$tvshows_export" tvshows_shasum_modified="$(sha512sum "$tvshows_export" | awk '{print $1}')" if [[ "$tvshows_shasum_original" != "$tvshows_shasum_modified" ]]; then