summaryrefslogtreecommitdiff
path: root/debian/replace_thumbnailer.sh
blob: d70dec0295ec6fd2bcef1c4d3e3f61ae050f8b80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#! /bin/bash

if [ -e /usr/lib/shotwell-video-thumbnailer.org ] ; then
    echo ' /usr/lib/shotwell-video-thumbnailer.org exists!'
    echo ' break'
    exit 1
fi

echo '**** backup ****'
mv /usr/lib/shotwell-video-thumbnailer /usr/lib/shotwell-video-thumbnailer.org

echo '**** install ffmpegthumbnailer ****'
apt-get install ffmpegthumbnailer -y

echo '**** install new file ****'
touch /usr/lib/shotwell-video-thumbnailer
chmod  --reference=/usr/lib/shotwell-video-thumbnailer.org /usr/lib/shotwell-video-thumbnailer

echo '#! /bin/bash' >/usr/lib/shotwell-video-thumbnailer
echo '' >>/usr/lib/shotwell-video-thumbnailer
echo 'ffmpegthumbnailer -i "$1" -o - -c png' >>/usr/lib/shotwell-video-thumbnailer