Browse Source

fish: add ds-patch script

master
Alison Watson 1 year ago
parent
commit
22e217f406
1 changed files with 14 additions and 0 deletions
  1. +14
    -0
      fish/ds-patch

+ 14
- 0
fish/ds-patch View File

@@ -0,0 +1,14 @@
#!/usr/bin/env fish

function ds-patch -d 'Patches a Nintendo DS game' -a zip xp
set out (basename "$zip" .zip).nds
set tmp (mktemp -d)

unzip "$zip" -d "$tmp"
xdelta3 -d -s "$tmp/"*.nds "$xp" "$tmp/patched.nds"
ndstrim "$tmp/patched.nds" "$out"

rm -rf "$tmp"
end

## EOF

Loading…
Cancel
Save