v2board/update.sh
2023-05-20 20:50:53 +08:00

23 lines
580 B
Bash
Executable File

#!/bin/bash
if [ ! -d ".git" ]; then
echo "Please deploy using Git."
exit 1
fi
if ! command -v git &> /dev/null; then
echo "Git is not installed! Please install git and try again."
exit 1
fi
git config --global --add safe.directory $(pwd)
git fetch --all && git reset --hard origin/master && git pull origin master
rm -rf composer.lock composer.phar
wget https://github.com/composer/composer/releases/latest/download/composer.phar -O composer.phar
php composer.phar update -vvv
php artisan v2board:update
if [ -f "/etc/init.d/bt" ]; then
chown -R www $(pwd);
fi