From afbcf999327c79cb5e8948e86816532642e95a1c Mon Sep 17 00:00:00 2001 From: Mathieu Maret Date: Thu, 22 Sep 2022 15:50:12 +0200 Subject: [PATCH] [script] use grep -E instead of egrep --- scripts/backup_gitea.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/backup_gitea.sh b/scripts/backup_gitea.sh index 7a96d28..c51a43d 100755 --- a/scripts/backup_gitea.sh +++ b/scripts/backup_gitea.sh @@ -1,6 +1,6 @@ #!/bin/bash -nb_bk=$(sudo ls /var/lib/gitea/ | egrep ".*dump.*.zip" |wc -l) +nb_bk=$(sudo ls /var/lib/gitea/ | grep -E ".*dump.*.zip" |wc -l) if [ $nb_bk != 0 ]; then echo "EXISTING GITEA BACKUP!" @@ -9,7 +9,7 @@ fi sudo -u gitea sh -c "cd ~gitea; gitea dump -c /etc/gitea/app.ini > /dev/null 2>&1" -backup_file=$(sudo ls /var/lib/gitea/ | egrep ".*dump.*.zip") +backup_file=$(sudo ls /var/lib/gitea/ | grep -E ".*dump.*.zip") backup_file="/var/lib/gitea/"$backup_file sudo mv $backup_file /tmp/ backup_file="/tmp/$(basename $backup_file)"