import_single_pano.sh 442 B

123456789101112131415161718192021222324
  1. #!/bin/sh
  2. if [ -z "$2" ]
  3. then
  4. echo "Usage: $0 <site.params> <panorama.tif>"
  5. echo "Import a panorama into the Django database."
  6. exit
  7. fi
  8. param_file="$1"
  9. pano_file="$2"
  10. for file in "$param_file" "$pano_file"
  11. do
  12. if [ ! -f "$file" ]
  13. then
  14. echo "Error: file '$file' not found"
  15. exit
  16. fi
  17. done
  18. DIRNAME="$(dirname $0)"
  19. php "$DIRNAME"/export_single_pano.php "$param_file" | "$DIRNAME"/../manage.py import_single_pano "$pano_file"