random scripts I use
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines

  1. #!/usr/bin/env fish
  2. function ds-patch -d 'Patches a Nintendo DS game' -a zip xp
  3. set out (basename "$zip" .zip).nds
  4. set tmp (mktemp -d)
  5. unzip "$zip" -d "$tmp"
  6. xdelta3 -d -s "$tmp/"*.nds "$xp" "$tmp/patched.nds"
  7. ndstrim "$tmp/patched.nds" "$out"
  8. rm -rf "$tmp"
  9. end
  10. ## EOF