random scripts I use
25개 이상의 토픽을 선택하실 수 없습니다. 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