-
Notifications
You must be signed in to change notification settings - Fork 46
/
biblioteq.sh
executable file
·48 lines (38 loc) · 936 Bytes
/
biblioteq.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
#!/usr/bin/env sh
# Alexis Megas.
export QT_AUTO_SCREEN_SCALE_FACTOR=1
# Disable https://en.wikipedia.org/wiki/MIT-SHM.
export QT_X11_NO_MITSHM=1
kde=$(env | grep -ci kde 2>/dev/null)
if [ $kde -gt 0 ]
then
echo "KDE!"
style="-style=Breeze"
else
style="-style=Fusion"
fi
if [ -r ./BiblioteQ ] && [ -x ./BiblioteQ ]
then
echo "Launching a local BiblioteQ."
if [ -r ./Lib ]
then
export LD_LIBRARY_PATH=Lib
fi
exec ./BiblioteQ "$style" "$@"
exit $?
fi
if [ -r /opt/biblioteq/BiblioteQ ] && [ -x /opt/biblioteq/BiblioteQ ]
then
echo "Launching an official BiblioteQ."
cd /opt/biblioteq && exec ./BiblioteQ "$style" "$@"
exit $?
fi
if [ -r /usr/local/biblioteq/BiblioteQ ] &&
[ -x /usr/local/biblioteq/BiblioteQ ]
then
echo "Launching an official BiblioteQ."
cd /usr/local/biblioteq && exec ./BiblioteQ "$style" "$@"
exit $?
fi
echo "BiblioteQ was not found!"
exit 1