forked from axiom-team/jaklis
Prevent apt install on other distro on setup
This commit is contained in:
parent
f99b6558a2
commit
b8c84c8126
18
setup.sh
18
setup.sh
|
@ -2,13 +2,17 @@
|
||||||
|
|
||||||
hasError=0
|
hasError=0
|
||||||
|
|
||||||
for i in gcc python3-pip python3-setuptools libpq-dev python3-dev python3-wheel; do
|
if [ -f "/etc/arch-release" ]; then
|
||||||
if [ $(dpkg-query -W -f='${Status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
echo '! jaklis needs gcc python3-pip python3-setuptools libpq-dev python3-dev python3-wheel'
|
||||||
[[ ! $j ]] && sudo apt update
|
elif [ -f "/etc/lsb-release" ]; then # ubuntu
|
||||||
sudo apt install -y $i
|
for i in gcc python3-pip python3-setuptools libpq-dev python3-dev python3-wheel; do
|
||||||
j=1
|
if [ $(dpkg-query -W -f='${Status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
||||||
fi
|
[[ ! $j ]] && sudo apt update
|
||||||
done
|
sudo apt install -y $i
|
||||||
|
j=1
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
|
||||||
pip3 install -r requirements.txt || hasError=1
|
pip3 install -r requirements.txt || hasError=1
|
||||||
chmod u+x jaklis.py
|
chmod u+x jaklis.py
|
||||||
|
|
Loading…
Reference in New Issue