Browse Source

Make the output less verbose

poesty 1 năm trước cách đây
mục cha
commit
8e32e5ddc3
2 tập tin đã thay đổi với 8 bổ sung8 xóa
  1. 4 4
      update/update_bookstack.sh
  2. 4 4
      update/update_librex.sh

+ 4 - 4
update/update_bookstack.sh

@@ -15,8 +15,8 @@ BOOKSTACK_DIR="/var/www/bookstack"
 cd $BOOKSTACK_DIR || exit
 
 # Check update
-git fetch origin release -n
-[ -n "$(git diff @ @{u})" ] || { echo "Up-to-date" && exit; }
+git fetch origin release -n --quiet
+[ -n "$(git diff --quiet @ @{u})" ] || { echo "Up-to-date" && exit; }
 
 # Get database options from BookStack .env file
 export $(cat "$BOOKSTACK_DIR/.env" | grep ^DB_ | xargs)
@@ -42,8 +42,8 @@ rclone copy "$BACKUP_DIR.tar.gz.gpg" od-1:/upload -vP
 rm "$BACKUP_DIR.tar.gz.gpg"
 
 # Run BookStack upgrade commands
-git pull origin release
+git pull origin release --quiet
 composer install --no-dev
 php artisan migrate
 php artisan cache:clear
-php artisan view:clear
+php artisan view:clear

+ 4 - 4
update/update_librex.sh

@@ -1,6 +1,6 @@
 #!/bin/bash
 cd /root/librex
-git fetch origin main -n
-[ -n "$(git diff @ @{u})" ] || { echo "Up-to-date" && exit; }
-git pull
-lftp -c "set sftp:auto-confirm yes; open sftp://[REDACTED]; mirror -Rev ./ [REMOTE]/ --only-newer --parallel=10 -X .htaccess -X config.php -X opensearch.xml -X robots.txt"
+git fetch origin main -n --quiet
+[ -n "$(git diff --quiet @ @{u})" ] || { echo "Up-to-date" && exit; }
+git pull --quiet
+lftp -c "set sftp:auto-confirm yes; open sftp://[REDACTED]; mirror -Rev ./ [REMOTE]/ --only-newer --parallel=10 -X .htaccess -X config.php -X opensearch.xml -X robots.txt"