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.

14 lines
279 B

#!/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"
## EOF