Update build-cog-map.sh
This commit is contained in:
parent
e1538a1eda
commit
4e3b0c101a
1 changed files with 0 additions and 0 deletions
36
build-cog-map.sh
Normal file
36
build-cog-map.sh
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
#!/bin/bash
|
||||
|
||||
BASE="/scans/thinsect/cog_out"
|
||||
OUT="/var/www/html/tif-index.json"
|
||||
|
||||
echo "{" > "$OUT"
|
||||
|
||||
FIRST=true
|
||||
|
||||
find "$BASE" -name "*.tif" | while read FILE
|
||||
do
|
||||
|
||||
#
|
||||
# Dateiname ohne .tif
|
||||
#
|
||||
NAME=$(basename "$FILE" .tif)
|
||||
|
||||
#
|
||||
# relativer Pfad
|
||||
#
|
||||
REL="${FILE#$BASE/}"
|
||||
|
||||
if [ "$FIRST" = true ]; then
|
||||
FIRST=false
|
||||
else
|
||||
echo "," >> "$OUT"
|
||||
fi
|
||||
|
||||
echo -n " \"$NAME\": \"$REL\"" >> "$OUT"
|
||||
|
||||
done
|
||||
|
||||
echo "" >> "$OUT"
|
||||
echo "}" >> "$OUT"
|
||||
|
||||
echo "fertig: $OUT"
|
||||
Loading…
Add table
Add a link
Reference in a new issue