Astroport.ONE/tools/jaklis/setup.sh

22 lines
592 B
Bash
Raw Permalink Normal View History

2022-08-23 13:54:16 +02:00
#!/bin/bash
2024-02-02 20:11:54 +01:00
hasError=0
for i in gcc python3-pip python3-setuptools libpq-dev python3-dev python3-wheel; do
if [ $(dpkg-query -W -f='${Status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
[[ ! $j ]] && sudo apt update
sudo apt install -y $i
j=1
fi
2022-08-23 13:54:16 +02:00
done
2024-02-03 12:26:30 +01:00
pip3 install --break-system-packages -r requirements.txt || hasError=1
2024-02-02 20:11:54 +01:00
chmod u+x jaklis.py
sudo ln -sf $(realpath jaklis.py) /usr/local/bin/jaklis || hasError=1
2024-01-16 15:02:26 +01:00
2024-02-02 20:11:54 +01:00
if [[ hasError -eq 0 ]]; then
echo "Setup done. You can use 'jaklis' command, try it."
else
echo "An error has occurred"
fi