diff options
author | Suren A. Chilingaryan <csa@suren.me> | 2019-10-10 23:59:38 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@suren.me> | 2019-10-10 23:59:38 +0200 |
commit | 682b308d8a7804d0ae2b2606b3ba0ff8814c1473 (patch) | |
tree | 9a191e0b4f963668fa60cabdd9ee33694886f35e /process.sh | |
download | openmtbmap-682b308d8a7804d0ae2b2606b3ba0ff8814c1473.tar.gz openmtbmap-682b308d8a7804d0ae2b2606b3ba0ff8814c1473.tar.bz2 openmtbmap-682b308d8a7804d0ae2b2606b3ba0ff8814c1473.tar.xz openmtbmap-682b308d8a7804d0ae2b2606b3ba0ff8814c1473.zip |
Initial release
Diffstat (limited to 'process.sh')
-rwxr-xr-x | process.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/process.sh b/process.sh new file mode 100755 index 0000000..06bba28 --- /dev/null +++ b/process.sh @@ -0,0 +1,18 @@ +#! /bin/bash + +for name in `ls downloads/*.exe`; do + if [[ "$name" =~ "velo" ]]; then + mapname=`basename $name .exe | cut -c 5-` + img=maps/velo-$mapname.img + else + mapname=`basename $name .exe | cut -c 4-` + img=maps/mtb-$mapname.img + fi + + [ -f $img ] && continue + + ./generate.sh $name + if [ $? -ne 0 ]; then + break + fi +done |