fish: add ds-patch script

master
an 2019-08-20 21:01:24 -04:00
rodzic 7d579cad7a
commit 22e217f406
1 zmienionych plików z 14 dodań i 0 usunięć

14
fish/ds-patch Normal file
Wyświetl plik

@ -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