@@ -2,8 +2,9 @@
3set -eu -o pipefail
3set -eu -o pipefail
5−tmpfile=$(mktemp "stackage-update.XXXXXXX")
5+tmpfile=$(mktemp "update-stackage.XXXXXXX")
6+# shellcheck disable=SC2064
6−trap "rm $tmpfile" 0
7+trap "rm ${tmpfile} ${tmpfile}.new" 0
8curl -L -s "https://www.stackage.org/lts/cabal.config" >"$tmpfile"
9curl -L -s "https://www.stackage.org/lts/cabal.config" >"$tmpfile"
9version=$(sed -n "s/^--.*http:..www.stackage.org.snapshot.lts-//p" "$tmpfile")
10version=$(sed -n "s/^--.*http:..www.stackage.org.snapshot.lts-//p" "$tmpfile")
@@ -16,7 +17,7 @@ sed -r \
16 -e 's|,$||' \
17 -e 's|,$||' \
17 -e '/installed$/d' \
18 -e '/installed$/d' \
18 -e '/^$/d' \
19 -e '/^$/d' \
19− -i "$tmpfile"
20+ < "${tmpfile}" | sort --ignore-case >"${tmpfile}.new"
21# Drop restrictions on some tools where we always want the latest version.
22# Drop restrictions on some tools where we always want the latest version.
@@ -38,9 +39,10 @@ sed -r \
38 -e '/ ShellCheck /d' \
39 -e '/ ShellCheck /d' \
39 -e '/ stack /d' \
40 -e '/ stack /d' \
40 -e '/ weeder /d' \
41 -e '/ weeder /d' \
41− -i "$tmpfile"
42+ < "${tmpfile}.new" > "${tmpfile}"
43# Drop the previous configuration ...
44# Drop the previous configuration ...
45+# shellcheck disable=SC1004
44sed -e '/# LTS Haskell/,/^$/c \TODO\
46sed -e '/# LTS Haskell/,/^$/c \TODO\
45' -i nixpkgs/pkgs/development/haskell-modules/configuration-hackage2nix.yaml
47' -i nixpkgs/pkgs/development/haskell-modules/configuration-hackage2nix.yaml