Script for installing 2gis-3.0 data

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
#!/bin/sh
# Script for installing 2gis-3.0 data
targ=$1
iszip=`echo $targ | grep 'zip'`
if [ ! -z "$iszip" ]; then
unzip "$targ"
fi
7z x "${targ/%.zip/.msi}"
if [ ! -z "$iszip" ]; then
rm "${targ/%.zip/.msi}"
fi
rm \!* Binary* *SummaryInformation
cabextract Sample.cab
rm MarkInstall
rm *_DGLAN
rm Sample.cab
rename -v 's/(.+)_DGDAT$/$1.dgdat/' *_DGDAT
mv -v -f *.dgdat ~/.wine/drive_c/Program\ Files/2gis/3.0