feat(bin) adjust dload.sh
This commit is contained in:
parent
2c5421c6fa
commit
f5c26dc2a0
13
bin/dload.sh
13
bin/dload.sh
|
@ -40,26 +40,29 @@ echo "csvFileDot: $csvFileDot"
|
|||
csvFileDotPath=${unzipDir}/$csvFileDot
|
||||
echo "csvFileDotPath: $csvFileDotPath"
|
||||
sed 's/\([[:digit:]]\)\,\([[:digit:]]\)/\1.\2/g' $csvFilePath > $csvFileDotPath
|
||||
rm $csvFilePath
|
||||
#
|
||||
csvFileLower=${csvFileNoExt}-dot-lower.csv
|
||||
echo "csvFileLower: $csvFileLower"
|
||||
csvFileLowerPath=${unzipDir}/$csvFileLower
|
||||
echo "csvFileLowerPath: $csvFileLowerPath"
|
||||
sed '1s/\(.*\)/\L\1/' $csvFileDotPath > $csvFileLowerPath
|
||||
#
|
||||
ZHV_CSV_OUTPUT="$3"
|
||||
echo "ZHV_CSV_OUTPUT: $ZHV_CSV_OUTPUT"
|
||||
cp $csvFileLowerPath $ZHV_CSV_OUTPUT
|
||||
rm $csvFileDotPath
|
||||
#
|
||||
csvFileComma=${csvFileNoExt}-dot-lower-comma.csv
|
||||
echo "csvFileComma: $csvFileComma"
|
||||
csvFileCommaPath=${unzipDir}/$csvFileComma
|
||||
echo "csvFileCommaPath: $csvFileCommaPath"
|
||||
sed -E 's/(");(")/\1\,\2/g' $csvFileLowerPath > $csvFileCommaPath
|
||||
rm $csvFileLowerPath
|
||||
#
|
||||
ZHV_CSV_OUTPUT="$3"
|
||||
echo "ZHV_CSV_OUTPUT: $ZHV_CSV_OUTPUT"
|
||||
mv $csvFileCommaPath $ZHV_CSV_OUTPUT
|
||||
#
|
||||
GTFS_CSV_OUTPUT="$4"
|
||||
echo "GTFS_CSV_OUTPUT: $GTFS_CSV_OUTPUT"
|
||||
cp $csvFileCommaPath $GTFS_CSV_OUTPUT
|
||||
cp $ZHV_CSV_OUTPUT $GTFS_CSV_OUTPUT
|
||||
#
|
||||
echo "Done."
|
||||
#done.
|
||||
|
|
Loading…
Reference in New Issue