-
Notifications
You must be signed in to change notification settings - Fork 1
/
debian-install.sh
executable file
·63 lines (51 loc) · 1.55 KB
/
debian-install.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/bin/sh
export LC_ALL=C
# track return code
rc=0
# save current path
CURRENT_PATH=`pwd`
# check if ubuntu (:sudo) or debian (:su) is running
/usr/bin/lsb_release -i|/bin/grep "Ubuntu" && PRIV="/usr/bin/sudo /bin/sh -c"
/usr/bin/lsb_release -i|/bin/grep "Debian" && PRIV="/bin/su root -c"
install_deps() {
# install dist deps
DEPS="libpoppler-qt4-dev pyqt4-dev-tools python-qt4-dev python-sip-dev"
# check if packages are already installed
STATUS=`/usr/bin/dpkg-query -W -f='${Status}\n' $DEPS 2>&1| /bin/grep -v "^install ok" | /usr/bin/wc -l`
if [ 0 -ne $STATUS ]
then
echo "Installing required packages"
# install required packages
$PRIV "/usr/bin/aptitude install $DEPS"
rc=`expr $rc + $?`
fi
# install pypoppler-qt4
/usr/bin/wget http://pyqt4-extrawidgets.googlecode.com/files/pypoppler-qt4-20962-fixed.tar.gz
/bin/tar xvzf pypoppler-qt4-20962-fixed.tar.gz
/bin/rm -f pypoppler-qt4-20962-fixed.tar.gz
cd pypoppler-qt4
echo "Configuring pypoppler-qt4 ..."
/usr/bin/python configure.py
/usr/bin/make
rc=`expr $rc + $?`
echo "Installing pypoppler-qt4 ..."
$PRIV "/usr/bin/make install"
rc=`expr $rc + $?`
# goto initial path
cd $CURRENT_PATH
}
# install dependencies
install_deps
# prepare start of pdfpresenter.py
/bin/chmod +x pdfpresenter.py
# --help
echo "[x] DONE
Usage:
1. Run: ./pdfpresenter.py
2. Focus on black window
3. Press 'o' to open a file
4. Move presentation view to projector/external display
5. Press 'f' to enter fullscreen mode
6. Wait for caching to finish
7. Use right/left arrow keys to go to next/previous slide"
exit $rc