-
Notifications
You must be signed in to change notification settings - Fork 0
/
build.sh
executable file
·35 lines (34 loc) · 1.17 KB
/
build.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
#!/bin/bash
download_link=https://github.com/ArjunSahlot/dodger_plane/archive/master.zip
temporary_dir=$(mktemp -d)
echo "Checking if curl is installed"
if [ $(sudo dpkg-query -l | grep curl | wc -l) -eq 0 ];
then
echo -e "\033[0;31mcurl is not installed\033[0m"
echo "Installing curl..."
sudo apt install -y curl;
echo -e "\033[0;32mcurl was successfully installed\033[0m"
else
echo -e "\033[0;32mcurl is already installed\033[0m"
fi
curl -LO $download_link \
&& unzip -d $temporary_dir master.zip \
&& rm -rf master.zip \
&& mkdir -p $1 \
&& cp -r $temporary_dir/dodger_plane-master $1/dodger_plane \
&& rm -rf $temporary_dir \
&& echo -e "\033[0;32mSuccessfully downloaded to $1/dodger_plane\033[0m" \
&& echo "Checking if pip is installed"
if [ $(sudo dpkg-query -l | grep python3-pip | wc -l) -eq 0 ];
then
echo -e "\033[0;31mpip is not installed\033[0m" \
&& echo "Installing pip..." \
&& sudo apt install -y python3-pip \
&& echo -e "\033[0;32mpip was successfully installed\033[0m"
else
echo -e "\033[0;32mpip is already installed\033[0m"
fi
echo "Installing requirements" \
&& cd $1/dodger_plane \
&& pip3 install -r requirements.txt \
&& echo -e "\033[0;32mDone!\033[0m"