Skip to content

Commit ace93a5

Browse files
committed
Fix the bug
1 parent 8407917 commit ace93a5

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

update.sh

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,14 +30,16 @@ do
3030
read -p "Are you sure you want to update?[y/n]: " answer
3131
echo " "
3232
if [ "$answer" != "${answer#[Yy]}" ]; then
33-
echo -e "\n\e[92mUpdating ...\033[0m\n"
3433
mv /var/www/html/wizwizxui-timebot/baseInfo.php /root/
35-
sleep 2
36-
# git config --global --add safe.directory /var/www/html/wizwizxui-timebot
37-
cd /var/www/html/wizwizxui-timebot
38-
# git pull
39-
git stash
40-
sleep 1
34+
echo -e "\n\e[92mUpdating ...\033[0m\n"
35+
sleep 4
36+
rm -r /var/www/html/wizwizxui-timebot/
37+
echo -e "\n\e[92mWait a few seconds ...\033[0m\n"
38+
sleep 3
39+
git clone https://github.com/wizwizdev/wizwizxui-timebot.git /var/www/html/wizwizxui-timebot
40+
sudo chown -R www-data:www-data /var/www/html/wizwizxui-timebot/
41+
sudo chmod -R 755 /var/www/html/wizwizxui-timebot/
42+
sleep 3
4143
mv /root/baseInfo.php /var/www/html/wizwizxui-timebot/
4244
if [ $? -ne 0 ]; then
4345
echo -e "\n\e[41mError: The update failed!\033[0m\n"

0 commit comments

Comments
 (0)