export patch option is now upstream

This commit is contained in:
Robin Appelman 2024-04-05 13:47:33 +02:00
commit 1e0afc4381
2 changed files with 2 additions and 30 deletions

View file

@ -1,23 +0,0 @@
diff --git a/patch-fbc.sh b/patch.sh
index 03bd467..a7f52a1 100644
--- a/patch.sh
+++ b/patch.sh
@@ -406,12 +406,9 @@ list_supported_versions () {
get_supported_versions
}
-case "${opmode}" in
- patch) patch ;;
- patchrollback) rollback ;;
- patchhelp) print_usage ; exit 2 ;;
- patchcheckversion) query_version_support ;;
- patchlistversions) list_supported_versions ;;
- *) echo "Incorrect combination of flags. Use option -h to get help."
- exit 2 ;;
-esac
+for i in "${!patch_list[@]}"
+do
+ echo "$i"
+ echo "${patch_list[$i]}"
+done |
+jq -n -R 'reduce inputs as $i ({}; . + { ($i): (input|(tonumber? // .)) })'

View file

@ -1,18 +1,13 @@
{
lib,
writeShellApplication,
patch,
jq,
}:
writeShellApplication {
name = "nvidia-patch-extrator";
runtimeInputs = [patch jq];
runtimeInputs = [jq];
text = ''
mkdir -p /tmp/nvidia-patch
cp "$1" /tmp/nvidia-patch/patch.sh
cd /tmp/nvidia-patch
patch -p1 < ${./extract-patch-list.diff} 1>&2
bash patch.sh | jq --sort-keys .
bash "$1" -j
'';
}