2023-12-14 23:59:10 +08:00
|
|
|
#!/usr/bin/env bash
|
2024-01-11 20:25:06 +08:00
|
|
|
|
2023-12-14 23:59:10 +08:00
|
|
|
cd "$(dirname "$0")"
|
|
|
|
|
|
|
|
for var in "$@"
|
|
|
|
do
|
|
|
|
if [[ $var == --reset ]] ; then
|
|
|
|
echo "Performing a full reset..."
|
2024-07-09 20:28:14 +08:00
|
|
|
sudo rm -rf node_modules
|
2023-12-14 23:59:10 +08:00
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
|
|
|
if [ ! -d ./node_modules ] ; then
|
2024-07-09 20:28:14 +08:00
|
|
|
sudo npm ci --no-progress
|
2023-12-14 23:59:10 +08:00
|
|
|
fi
|
|
|
|
|
2024-07-09 20:28:14 +08:00
|
|
|
sudo npm run build
|
2023-12-14 23:59:10 +08:00
|
|
|
|
|
|
|
# handle renaming circa dec 2023
|
|
|
|
if [[ -d /usr/local/bigbluebutton/bbb-graphql-actions-adapter-server ]] ; then
|
|
|
|
sudo systemctl stop bbb-graphql-actions-adapter-server
|
|
|
|
sudo rm -f /usr/lib/systemd/system/bbb-graphql-actions-adapter-server.service
|
|
|
|
sudo systemctl daemon-reload
|
|
|
|
sudo rm -rf /usr/local/bigbluebutton/bbb-graphql-actions-adapter-server
|
|
|
|
fi
|
|
|
|
|
2024-07-09 20:28:14 +08:00
|
|
|
sudo mv -f dist/index.js dist/bbb-graphql-actions.js
|
2023-12-14 23:59:10 +08:00
|
|
|
sudo cp -rf dist/* /usr/local/bigbluebutton/bbb-graphql-actions
|
|
|
|
sudo systemctl restart bbb-graphql-actions
|
|
|
|
echo ''
|
|
|
|
echo ''
|
|
|
|
echo '----------------'
|
|
|
|
echo 'bbb-graphql-actions updated'
|