comparison install @ 0:92c70579720e default tip

Initial commit
author Brad Greco <brad@bgreco.net>
date Wed, 13 Jan 2021 19:25:09 -0500
parents
children
comparison
equal deleted inserted replaced
-1:000000000000 0:92c70579720e
1 #!/bin/bash
2
3 set -e
4
5 cwd=$(dirname "$0")
6
7 if [ $EUID -ne 0 ]; then
8 echo "This script must be run with root privileges."
9 exit 1
10 fi
11
12 if ! which mogrify > /dev/null 2>&1; then
13 echo "Please install imagemagick first"
14 exit 1
15 fi
16
17 if ! which exiftool > /dev/null 2>&1; then
18 echo "Please install libimage-exiftool-perl first"
19 exit 1
20 fi
21
22 cp "$cwd/jpeg-exif-thumbnailer" /usr/bin/
23 chmod +x /usr/bin/jpeg-exif-thumbnailer
24 cp "$cwd/jpeg-exif.thumbnailer" /usr/share/thumbnailers/
25 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'