[script] use grep -E instead of egrep
This commit is contained in:
parent
e6b9d84f02
commit
afbcf99932
@ -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)"
|
||||
|
Loading…
Reference in New Issue
Block a user