forked from Antergos/Cnchi
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run
executable file
·32 lines (25 loc) · 893 Bytes
/
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
#!/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
_CNCHI_DIR=`pwd`
if ! [[ -f /usr/share/cnchi ]]; then
sudo rm /usr/share/cnchi
echo Creating soft link /usr/share/cnchi to ${_CNCHI_DIR}
sudo ln -sf ${_CNCHI_DIR} /usr/share/cnchi
fi
if [[ -f /usr/bin/python3 ]]; then
# Debian (for testing at work)
sudo touch /etc/pacman.conf
_PYTHON="/usr/bin/python3"
_RUN_CMD="sudo -E"
else
_PYTHON="/usr/bin/python"
_RUN_CMD="pkexec env DISPLAY=$DISPLAY XAUTHORITY=$XAUTHORITY GTK_DEBUG=interactive"
fi
#_PYTHON="/opt/pypy3/bin/pypy3"
_PYTHON_OPTIONS="-Wall -X track-resources"
#_XML="/usr/share/cnchi/data/packages.xml"
_CNCHI_OPTIONS="-d -r -v"
$_RUN_CMD $_PYTHON $_PYTHON_OPTIONS $_CNCHI_DIR/src/cnchi.py $_CNCHI_OPTIONS ${@} 2>&1
exit 0