summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/makecolumns.sh17
1 files changed, 14 insertions, 3 deletions
diff --git a/src/makecolumns.sh b/src/makecolumns.sh
index 016f6de..4666f3f 100644
--- a/src/makecolumns.sh
+++ b/src/makecolumns.sh
@@ -21,8 +21,8 @@ main() {
21 # Compile all the binaries 21 # Compile all the binaries
22 make all 22 make all
23 23
24 mkdir -p ../work_`basename $1` 24 mkdir -p ../work_`basename ${1#white_}`
25 cd ../work_`basename $1` || exit 1 25 cd ../work_`basename ${1#white_}` || exit 1
26 26
27 unset strassen; [ -f $1/dat/strassen.dat ] && strassen=$1/dat/strassen.dat 27 unset strassen; [ -f $1/dat/strassen.dat ] && strassen=$1/dat/strassen.dat
28 28
@@ -36,6 +36,7 @@ main() {
36 else 36 else
37 echo "Not a recognized Telefonbuch folder" 37 echo "Not a recognized Telefonbuch folder"
38 fi 38 fi
39 cd ..
39} 40}
40 41
41get_dword() { 42get_dword() {
@@ -48,7 +49,7 @@ handle_old_format() {
48 # Clear old files. Be very careful, we could 49 # Clear old files. Be very careful, we could
49 # have ended up in an unexpected directory, after all. 50 # have ended up in an unexpected directory, after all.
50 find -E . -depth 1 -regex '^\./[0123456789]+' -delete 51 find -E . -depth 1 -regex '^\./[0123456789]+' -delete
51 rm ??_* 52 rm -f ??_*
52 53
53 # If street names come in an extra file, extract 54 # If street names come in an extra file, extract
54 # street names first 55 # street names first
@@ -166,6 +167,16 @@ handle_new_format() {
166 cat file_* > streets 167 cat file_* > streets
167 rm file_* 168 rm file_*
168 169
170 if [ -f $1/zip-streets-hn-geo.tl ]; then
171 ../bin/decompress $1/zip-streets-hn-geo.tl
172 cat file_* | tr '\n\0' '\t\n' > 90_Geokoordinaten_hnr
173 rm file_*
174 elif [ -f $1/zip-streets-geo.tl ]; then
175 ../bin/decompress $1/zip-streets-geo.tl
176 cat file_* | tr '\n\0' '\t\n' > 91_Geokoordinaten_str
177 rm file_*
178 fi
179
169 ../bin/decompress $1/phonebook.db 180 ../bin/decompress $1/phonebook.db
170 181
171 numfiles=`find . -name file_\* | wc -l` 182 numfiles=`find . -name file_\* | wc -l`