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
|
csvFileDotPath=${unzipDir}/$csvFileDot
|
||||||
echo "csvFileDotPath: $csvFileDotPath"
|
echo "csvFileDotPath: $csvFileDotPath"
|
||||||
sed 's/\([[:digit:]]\)\,\([[:digit:]]\)/\1.\2/g' $csvFilePath > $csvFileDotPath
|
sed 's/\([[:digit:]]\)\,\([[:digit:]]\)/\1.\2/g' $csvFilePath > $csvFileDotPath
|
||||||
|
rm $csvFilePath
|
||||||
#
|
#
|
||||||
csvFileLower=${csvFileNoExt}-dot-lower.csv
|
csvFileLower=${csvFileNoExt}-dot-lower.csv
|
||||||
echo "csvFileLower: $csvFileLower"
|
echo "csvFileLower: $csvFileLower"
|
||||||
csvFileLowerPath=${unzipDir}/$csvFileLower
|
csvFileLowerPath=${unzipDir}/$csvFileLower
|
||||||
echo "csvFileLowerPath: $csvFileLowerPath"
|
echo "csvFileLowerPath: $csvFileLowerPath"
|
||||||
sed '1s/\(.*\)/\L\1/' $csvFileDotPath > $csvFileLowerPath
|
sed '1s/\(.*\)/\L\1/' $csvFileDotPath > $csvFileLowerPath
|
||||||
#
|
rm $csvFileDotPath
|
||||||
ZHV_CSV_OUTPUT="$3"
|
|
||||||
echo "ZHV_CSV_OUTPUT: $ZHV_CSV_OUTPUT"
|
|
||||||
cp $csvFileLowerPath $ZHV_CSV_OUTPUT
|
|
||||||
#
|
#
|
||||||
csvFileComma=${csvFileNoExt}-dot-lower-comma.csv
|
csvFileComma=${csvFileNoExt}-dot-lower-comma.csv
|
||||||
echo "csvFileComma: $csvFileComma"
|
echo "csvFileComma: $csvFileComma"
|
||||||
csvFileCommaPath=${unzipDir}/$csvFileComma
|
csvFileCommaPath=${unzipDir}/$csvFileComma
|
||||||
echo "csvFileCommaPath: $csvFileCommaPath"
|
echo "csvFileCommaPath: $csvFileCommaPath"
|
||||||
sed -E 's/(");(")/\1\,\2/g' $csvFileLowerPath > $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"
|
GTFS_CSV_OUTPUT="$4"
|
||||||
echo "GTFS_CSV_OUTPUT: $GTFS_CSV_OUTPUT"
|
echo "GTFS_CSV_OUTPUT: $GTFS_CSV_OUTPUT"
|
||||||
cp $csvFileCommaPath $GTFS_CSV_OUTPUT
|
cp $ZHV_CSV_OUTPUT $GTFS_CSV_OUTPUT
|
||||||
#
|
#
|
||||||
echo "Done."
|
echo "Done."
|
||||||
#done.
|
#done.
|
||||||
|
|
Loading…
Reference in New Issue