forked from wyx2685/v2board
-
Notifications
You must be signed in to change notification settings - Fork 0
/
update.sh
executable file
·31 lines (25 loc) · 908 Bytes
/
update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/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_main_version=$(php -v | head -n 1 | cut -d ' ' -f 2 | cut -d '.' -f 1)
if [ $php_main_version -ge 8 ]; then
php composer.phar require joanhey/adapterman
php composer.phar require cedar2025/http-foundation:5.4.x-dev
php -c cli-php.ini webman.php stop
echo "Webman stopped.Please restart it by yourself."
fi
php artisan v2board:update
if [ -f "/etc/init.d/bt" ]; then
chown -R www $(pwd);
fi