iflbot-setup/install.sh

30 lines
924 B
Bash
Raw Normal View History

2022-10-10 21:08:58 +03:00
#!/bin/bash
# installation script
2022-10-27 10:49:53 +03:00
CUR_HOME=$(compgen -f -- /home/bot*)
cd "$CUR_HOME" || exit
2022-10-26 22:42:13 +03:00
mkdir tmp_install
cd tmp_install || exit
2022-10-27 08:37:41 +03:00
sudo apt install curl -y
2022-10-27 08:31:55 +03:00
if [ "$1" == 1 ]; then
2022-10-27 11:06:45 +03:00
wget http://sertifika.meb.gov.tr/MEB_SERTIFIKASI.cer
2022-10-27 08:31:55 +03:00
openssl x509 -inform DER -in MEB_SERTIFIKASI.cer -out MEB_SERTIFIKASI.crt
sudo cp MEB_SERTIFIKASI.crt /usr/local/share/ca-certificates/
sudo chmod 644 /usr/local/share/ca-certificates/MEB_SERTIFIKASI.crt
sudo update-ca-certificates
fi
2022-10-26 22:42:13 +03:00
wget https://github.com/asandikci/iflbot-setup/archive/refs/heads/main.tar.gz
tar -xzvf main.tar.gz
cd iflbot-setup-main || exit
2022-10-26 22:45:26 +03:00
cd src || exit
2022-10-26 22:47:42 +03:00
ls
2022-10-26 22:45:26 +03:00
chmod +x prerequisites.sh
chmod +x applications.sh
2022-10-27 08:44:51 +03:00
bash prerequisites.sh
bash applications.sh
2022-10-27 10:49:53 +03:00
EX_PATH="$CUR_HOME"/.vscode/extensions/
mkdir -p "$EX_PATH"
cp -r danielpinto8zz6.c-cpp-compile-run-1.0.18 "$EX_PATH"
2022-10-27 10:53:17 +03:00
cd "$CUR_HOME" || exit
2022-10-27 08:31:55 +03:00
rm -r tmp_install
2022-10-27 10:49:53 +03:00
echo "INSTALLATION SUCCESSFULLY COMPLETED"