2021-08-14 15:19:35 +02:00

66 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
tmp=$(mktemp)
cd /var/www/ga
whiptail --msgbox "Linking graphs directory" 7 28
mkdir graphql
if [ $? != 0 ]; then
echo -e "\033[0;31mCould not add graphql directory"
exit 1
fi
cd graphql
ln -s ../plugins/germanairlinesva/graphql/graphs
if [ $? != 0 ]; then
echo -e "\033[0;31mCould not link graphs directory"
exit 1
fi
whiptail --msgbox "Installing packages" 7 23
cd ../plugins/germanairlinesva/fleet
yarn install
if [ $? != 0 ]; then
echo -e "\033[0;31mCould not install fleet packages"
exit 1
fi
cd ../graphql
yarn install
if [ $? != 0 ]; then
echo -e "\033[0;31mCould not install graphql packages"
exit 1
fi
cd ../react
yarn install
if [ $? != 0 ]; then
echo -e "\033[0;31mCould not install react packages"
exit 1
fi
cd ../routes
yarn install
if [ $? != 0 ]; then
echo -e "\033[0;31mCould not install routes packages"
exit 1
fi
cd ../schooling
yarn install
if [ $? != 0 ]; then
echo -e "\033[0;31mCould not install schooling packages"
exit 1
fi
cd ../social
yarn install
if [ $? != 0 ]; then
echo -e "\033[0;31mCould not install social packages"
exit 1
fi
cd /var/www/ga
whiptail --msgbox "Setting ownership" 7 21
chown www-data:www-data -R .
if [ $? != 0 ]; then
echo -e "\033[0;31mCould not set ownership to www-data"
exit 1
fi