summaryrefslogtreecommitdiffstats
path: root/process.sh
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2022-06-26 01:59:38 +0400
committerSuren A. Chilingaryan <csa@suren.me>2022-06-26 01:59:38 +0400
commit0f437199b65025a903d568be87747cf5eb4b9805 (patch)
tree72f05f8ce69af6348e5c2521632f5ada5781f3ba /process.sh
parent90d1bf5893a9a373eccd40693f801aa74c3ad36b (diff)
downloadopenmtbmap-0f437199b65025a903d568be87747cf5eb4b9805.tar.gz
openmtbmap-0f437199b65025a903d568be87747cf5eb4b9805.tar.bz2
openmtbmap-0f437199b65025a903d568be87747cf5eb4b9805.tar.xz
openmtbmap-0f437199b65025a903d568be87747cf5eb4b9805.zip
Support for *linux.7z archivesHEADmaster
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