···11+#!/usr/bin/env nix-shell
22+#! nix-shell -i bash -p curl
33+44+# We use this script to download local copies instead of using
55+# fetchpatch because lmhouse/MINGW-packages-dev is constantly rebased
66+# against msys2/MINGW-packages-dev and won't have stable commit hashes.
77+88+name=Added-mcf-thread-model-support-from-mcfgthread.patch
99+source=https://raw.githubusercontent.com/lhmouse/MINGW-packages-dev/master/mingw-w64-gcc-git
1010+dest=$(dirname "$0")
1111+1212+for majorVersion in 6 7 8 9 10; do
1313+ curl "$source/9000-gcc-$majorVersion-branch-$name" \
1414+ > "$dest/$majorVersion/$name"
1515+done