summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2014-02-08 23:58:21 +0100
committerDirk Engling <erdgeist@erdgeist.org>2014-02-08 23:58:21 +0100
commita90b5e42599f20c91cab02025cb69df79efd10dc (patch)
tree3e920af58dd5fc57940df539cd9f5b055181e6f5 /src
parentf6ef4b51dd20aa5d595042419ac650f0a0a29320 (diff)
Allow decompress' reporting to be shown. Also report the progress in columns 1-based, not 0-based
Diffstat (limited to 'src')
-rwxr-xr-xsrc/makecolumns.sh6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/makecolumns.sh b/src/makecolumns.sh
index 1d4c399..9e8d6cb 100755
--- a/src/makecolumns.sh
+++ b/src/makecolumns.sh
@@ -197,7 +197,7 @@ handle_new_format() {
197 printf "done.\n" 197 printf "done.\n"
198 198
199 printf "Extracting phonebook.db ... " 199 printf "Extracting phonebook.db ... "
200 decompress $1/phonebook.db | grep -v appropriate 200 decompress $1/phonebook.db
201 201
202 rows=`find . -name file_\* | wc -l` 202 rows=`find . -name file_\* | wc -l`
203 rows=$(( rows / 11 )) 203 rows=$(( rows / 11 ))
@@ -205,11 +205,11 @@ handle_new_format() {
205 205
206 # Do enumerations with builtin shell tools. Unfortunally neither 206 # Do enumerations with builtin shell tools. Unfortunally neither
207 # jot nor seq are standards 207 # jot nor seq are standards
208 printf "Splitting decompressed chunks into their columns (11 total) ... 0, " 208 printf "Splitting decompressed chunks into their columns (11 total) ... 1, "
209 f=0; while [ $f -lt $rows ]; do printf "file_%05X " $(( f++ * 11)); done | xargs cat | xxd -ps -c1 > column_0 209 f=0; while [ $f -lt $rows ]; do printf "file_%05X " $(( f++ * 11)); done | xargs cat | xxd -ps -c1 > column_0
210 210
211 for column in 1 2 3 4 5 6 7 8 9 10; do 211 for column in 1 2 3 4 5 6 7 8 9 10; do
212 printf "%d, " $column 212 printf "%d, " $(( column + 1 ))
213 f=0; while [ $f -lt $rows ]; do printf "file_%05X " $(( column + f++ * 11 )); done | xargs cat | tr '\n\0' '\t\n' > column_${column} 213 f=0; while [ $f -lt $rows ]; do printf "file_%05X " $(( column + f++ * 11 )); done | xargs cat | tr '\n\0' '\t\n' > column_${column}
214 done 214 done
215 printf "done.\n" 215 printf "done.\n"