X-Git-Url: https://zdv2.bktei.com/gitweb/BK-2020-03.git/blobdiff_plain/ef95a74c3e2b20b0454963d19c519c3635e6c7b2..63680c0dcfbd11300fab8c5f3c4cab4ad31ae733:/user/bkphotorights diff --git a/user/bkphotorights b/user/bkphotorights index a55ab8e..ce468e5 100644 --- a/user/bkphotorights +++ b/user/bkphotorights @@ -1,9 +1,11 @@ -#!/bin/bash +#!/usr/bin/env bash # Desc: Apply metadata to photos # Usage: bkphotometa.sh [FILE in] # Ref/Attrib: [1]. Creative Commons XMP recommendation. (2015). https://wiki.creativecommons.org/wiki/XMP # [2]. Eva, Johannes. (2023-03-30). “How to edit EXIF metadata via the command line with ExifTool”. libre-software.net. https://libre-software.net/linux/edit-metadata-exiftool/ -# Version: 0.0.1 +# Version: 0.1.1 +# Depends: * exiftool 12.16 (https://exiftool.org/ ) +# * bash 5.1.16 # Adjust me strCreator="Steven Baltakatei Sandoval"; @@ -20,10 +22,12 @@ main() { # Check plumbing if [[ ! -f "$1" ]]; then die "FATAL:Not a file:$1"; fi; + if ! command -v exiftool 1>/dev/random 2>&1; then + die "FATAL:exiftool not available. See https://exiftool.org/ ."; fi; # Check file # Check if exiftool recognizes the file format - if ! exiftool -s -FileType "$file_in" 1>/dev/null; then + if ! exiftool -s -FileType "$file_in" 1>/dev/random; then yell "ERROR:File type not recognized by exiftool:$file_in"; fi; @@ -58,4 +62,5 @@ main() { main "$@"; - +# Author: Steven Baltakatei Sandoval +# License: GPLv3+