feat(user:bkphotorights):Check exiftool exists; Apply GPLv3+
authorSteven Baltakatei Sandoval <baltakatei@gmail.com>
Sat, 8 Jul 2023 09:43:19 +0000 (09:43 +0000)
committerSteven Baltakatei Sandoval <baltakatei@gmail.com>
Sat, 8 Jul 2023 09:43:19 +0000 (09:43 +0000)
user/bkphotorights

index a55ab8e03f8caed6c070001385519cec15fd1325..608a1e8df79675ff0646c63026ed139dc1e58a18 100644 (file)
@@ -3,7 +3,8 @@
 # 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.0
+# Depends: exiftool 12.16 (https://exiftool.org/ )
 
 # Adjust me
 strCreator="Steven Baltakatei Sandoval";
@@ -20,10 +21,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 +61,5 @@ main() {
 
 main "$@";
 
-
+# Author: Steven Baltakatei Sandoval
+# License: GPLv3+