summaryrefslogtreecommitdiffstats
path: root/process.sh
diff options
context:
space:
mode:
Diffstat (limited to 'process.sh')
-rwxr-xr-xprocess.sh26
1 files changed, 18 insertions, 8 deletions
diff --git a/process.sh b/process.sh
index 06bba28..865a5c2 100755
--- a/process.sh
+++ b/process.sh
@@ -1,17 +1,27 @@
#! /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
+for name in `find . -regextype posix-extended -iregex './downloads/.*(linux.7z|.exe)'`; do
+ if [[ "$name" =~ "linux.7z" ]]; then
+ if [[ "$name" =~ "velo" ]]; then
+ mapname=`basename $name linux.7z | cut -c 5-`
+ img=maps/velo-$mapname.img
+ else
+ mapname=`basename $name linux.7z | cut -c 4-`
+ img=maps/mtb-$mapname.img
+ fi
+ else
+ 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
fi
[ -f $img ] && continue
- ./generate.sh $name
+ bash ./generate.sh "$name" "$mapname" "$img"
if [ $? -ne 0 ]; then
break
fi