forked from Antergos/Cnchi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run
executable file
·52 lines (39 loc) · 1.18 KB
/
run
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
#!/bin/bash
# WARNING:
# This script is a helper that the developers use to call Cnchi (testing purposes only)
# Please, do not use if your intention is to do a "normal" installation
cleanup() {
if [[ -h /usr/share/cnchi ]]; then
sudo unlink /usr/share/cnchi
sudo mv /usr/share/cnchi.tmp /usr/share/cnchi > /dev/null 2>&1
fi
sudo killall python3 > /dev/null 2>&1
}
trap cleanup EXIT
if [[ -d /usr/share/cnchi ]] && ! [[ -h /usr/share/cnchi ]]; then
sudo mv /usr/share/cnchi /usr/share/cnchi.tmp > /dev/null 2>&1
fi
cnchi_dir=`pwd`
sudo ln -sf $cnchi_dir /usr/share/cnchi
#clear_fcache='False'
#for file in ${cnchi_dir}/data/fonts/OpenSans**
#do
# file_name=$(basename ${file})
# if ! [[ -f /usr/share/fonts/TTF/${file_name} ]]; then
# sudo cp ${file} /usr/share/fonts/TTF
# clear_fcache='True'
# fi
#done
#
#if [[ "${clear_fcache}" = 'True' ]]; then
# fc-cache -s -f -v
#fi
_PYTHON="/usr/bin/python"
_PYTHON_OPTIONS="-Wall"
_XML="/usr/share/cnchi/data/packages.xml"
_CNCHI_OPTIONS="-d -v --disable-rank-mirrors -s bugsnag"
if [ -f /usr/bin/python3 ]; then
_PYTHON="/usr/bin/python3"
fi
sudo -E $_PYTHON $_PYTHON_OPTIONS cnchi/cnchi.py $_CNCHI_OPTIONS -p $_XML ${@} 2>&1
exit 0