All pastes #1564632 Raw Edit

HG/SS Kazo Patch

public shellscript v1 · immutable
#1564632 ·published 2009-09-13 21:02 UTC
rendered paste body
#!/bin/bashfunction spinner {while [ -d /proc/$1 ]; do	echo -ne '\b/'; sleep 0.05	echo -ne '\b-'; sleep 0.05	echo -ne '\b\\'; sleep 0.05	echo -ne '\b|'; sleep 0.05done}read -p "Please confirm that your filenames have no spaces in them, then press enter" crapecho -n "Patching, please be patient, this may take up to a minute...  "cp -r rom tempfor file in temp/*.nds; do	mkdir temp/files	echo "=================================================================New log entry started: `date`-----------------------------------------------------------------" >>patch.log	wine ndstool.exe -x $file -9 temp/files/arm9.bin -7 temp/files/arm7.bin -y9 temp/files/y9.bin -y7 temp/files/y7.bin -d temp/files/data -y temp/files/overlay -t temp/files/banner.bin -h temp/files/header.bin &>>patch.log & spinner $!	echo -ne '\b '	cp -f patch temp/files/data/a/0/2/7	wine ndstool.exe -c `basename $file | sed -e 's/\.nds$/_patched.nds/'` -9 temp/files/arm9.bin -7 temp/files/arm7.bin -y9 temp/files/y9.bin -y7 temp/files/y7.bin -d temp/files/data -y temp/files/overlay -t temp/files/banner.bin -h temp/files/header.bin &>>patch.log & spinner $!	echo -ne '\b '	rm -rf temp/filesdonerm -rf tempecho -e '\b\bdone!'