diff install @ 0:92c70579720e default tip

Initial commit
author Brad Greco <brad@bgreco.net>
date Wed, 13 Jan 2021 19:25:09 -0500
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/install	Wed Jan 13 19:25:09 2021 -0500
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+set -e
+
+cwd=$(dirname "$0")
+
+if [ $EUID -ne 0 ]; then
+    echo "This script must be run with root privileges."
+    exit 1
+fi
+
+if ! which mogrify > /dev/null 2>&1; then
+	echo "Please install imagemagick first"
+	exit 1
+fi
+
+if ! which exiftool > /dev/null 2>&1; then
+	echo "Please install libimage-exiftool-perl first"
+	exit 1
+fi
+
+cp "$cwd/jpeg-exif-thumbnailer" /usr/bin/
+chmod +x /usr/bin/jpeg-exif-thumbnailer
+cp "$cwd/jpeg-exif.thumbnailer" /usr/share/thumbnailers/
+grep -l --exclude=jpeg-exif.thumbnailer image/jpeg /usr/share/thumbnailers/*.thumbnailer | xargs --no-run-if-empty sed -i 's|image/jpeg|image/disabled-jpeg|g'