47 lines
1.3 KiB
Bash
47 lines
1.3 KiB
Bash
#!/bin/bash
|
|
|
|
repos="{
|
|
\"ga.master\": {
|
|
\"type\": \"git\",
|
|
\"url\": \"https://git.hofmannnet.myhome-server.de/GermanAirlines/GermanAirlinesVA-OctoberPlugins.git\"
|
|
},
|
|
\"ga.graphql\": {
|
|
\"type\": \"git\",
|
|
\"url\": \"https://git.hofmannnet.myhome-server.de/GermanAirlines/GermanAirlinesVA-GraphQL.git\"
|
|
},
|
|
\"ga.schooling\": {
|
|
\"type\": \"git\",
|
|
\"url\": \"https://git.hofmannnet.myhome-server.de/GermanAirlines/GermanAirlinesVA-Schooling.git\"
|
|
},
|
|
\"ga.fleet\": {
|
|
\"type\": \"git\",
|
|
\"url\": \"https://git.hofmannnet.myhome-server.de/GermanAirlines/GermanAirlinesVA-Fleet.git\"
|
|
}
|
|
}"
|
|
require="{
|
|
\"germanairlinesva/master\": \"dev-master\"
|
|
}"
|
|
tmp=$(mktemp)
|
|
|
|
cd /var/www/ga
|
|
|
|
whiptail --msgbox "Adding repositories and require" 7 35
|
|
cp composer.json composer.json.bak
|
|
jq ".require += $require | .repositories += $repos" composer.json > "$tmp" && mv "$tmp" composer.json
|
|
if [ $? != 0 ]; then
|
|
echo -e "\033[0;31mCould not add GermanAirlines specific repositories and require"
|
|
exit 1
|
|
fi
|
|
|
|
whiptail --msgbox "Updating dependecies and migrating" 7 38
|
|
composer update
|
|
if [ $? != 0 ]; then
|
|
echo -e "\033[0;31mCould not install GermanAirlines plugins"
|
|
exit 1
|
|
fi
|
|
php artisan october:migrate
|
|
if [ $? != 0 ]; then
|
|
echo -e "\033[0;31mCould not migrate GermanAirlines plugins"
|
|
exit 1
|
|
fi
|