Skip to content

Instantly share code, notes, and snippets.

@hidsh
Created October 25, 2020 05:15
Show Gist options
  • Save hidsh/ce8c6f9e0314c9ba9d7f47e7a5bab9cf to your computer and use it in GitHub Desktop.
Save hidsh/ce8c6f9e0314c9ba9d7f47e7a5bab9cf to your computer and use it in GitHub Desktop.
# on WSL
ciso="/mnt/c/Program Files (x86)/danny_kay1710/PSP ISO Compressor/files/ciso.exe"
#ciso="/mnt/c/Program\ Files\ \(x86\)/danny_kay1710/PSP\ ISO\ Compressor/files/ciso.exe"
level=1
if [ ! -f "${ciso}" ]; then
echo "ERROR: File not found: $ciso"
exit 1
fi
n=`ls -1 ../ISO/*.iso | wc -l`
i=1
for x in `ls ../ISO/*.iso`; do
pt=`expr $i \* 100 / $n`
x_out='./'`basename -s .iso $x`'.cso'
echo -n "$i/$n ($pt%): $x --> $x_out"
"${ciso}" $level $x $x_out > /dev/null 2>&1
echo ": done"
i=`expr $i + 1`
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment