You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
1.1 KiB
Bash
37 lines
1.1 KiB
Bash
#!/usr/bin/env bash
|
|
# Test driver for geotag
|
|
|
|
source ./functions.source
|
|
|
|
( cd "$testdir"
|
|
|
|
printf "geotag" >&3
|
|
|
|
jpg=FurnaceCreekInn.jpg
|
|
gpx=FurnaceCreekInn.gpx
|
|
copyTestFiles $jpg $gpx
|
|
|
|
echo --- show GPSInfo tags ---
|
|
runTest exiv2 -pa --grep GPSInfo $jpg
|
|
tags=$(runTest exiv2 -Pk --grep GPSInfo $jpg | tr -d '\r') # MSVC puts out cr-lf lines
|
|
echo --- deleting the GPSInfo tags
|
|
for tag in $tags; do runTest exiv2 -M"del $tag" $jpg; done
|
|
runTest exiv2 -pa --grep GPS $jpg
|
|
echo --- run geotag ---
|
|
runTest geotag -ascii -tz -8:00 $jpg $gpx | cut -d' ' -f 2-
|
|
echo --- show GPSInfo tags ---
|
|
runTest exiv2 -pa --grep GPSInfo $jpg
|
|
|
|
) 3>&1 > $results 2>&1
|
|
|
|
printf "\n"
|
|
|
|
# ----------------------------------------------------------------------
|
|
# Evaluate results
|
|
cat $results | tr -d $'\r' > $results-stripped
|
|
mv $results-stripped $results
|
|
reportTest $results $good
|
|
|
|
# That's all Folks!
|
|
##
|