aboutsummaryrefslogtreecommitdiff
path: root/docker/runtime/backup-init.sh
diff options
context:
space:
mode:
authorᴜɴᴋɴᴡᴏɴ <u@gogs.io>2020-08-23 15:17:54 +0800
committerGitHub <noreply@github.com>2020-08-23 15:17:54 +0800
commit92c5f94fe7fae17620ecb8895e287e9e66fb135c (patch)
tree71accea059544297cdeddc2bed2b6017729f1609 /docker/runtime/backup-init.sh
parenta840ae90352f932d2b77cdbc0c78078b18a469c6 (diff)
shellcheck: fix warnings (#6274)
* Remove outdated files * Fix warnings
Diffstat (limited to 'docker/runtime/backup-init.sh')
-rw-r--r--docker/runtime/backup-init.sh4
1 files changed, 4 insertions, 0 deletions
diff --git a/docker/runtime/backup-init.sh b/docker/runtime/backup-init.sh
index 07298c5d..f4e21a1b 100644
--- a/docker/runtime/backup-init.sh
+++ b/docker/runtime/backup-init.sh
@@ -30,7 +30,9 @@ parse_generate_cron_expression() {
CRON_EXPR_DAYS="*"
CRON_EXPR_MONTHS="*"
+ # shellcheck disable=SC2001
TIME_INTERVAL=$(echo "${BACKUP_INTERVAL}" | sed -e 's/[hdM]$//')
+ # shellcheck disable=SC2001
TIME_UNIT=$(echo "${BACKUP_INTERVAL}" | sed -e 's/^[0-9]\+//')
if [ "${TIME_UNIT}" = "h" ]; then
@@ -74,7 +76,9 @@ parse_generate_cron_expression() {
parse_generate_retention_expression() {
FIND_TIME_EXPR='mtime'
+ # shellcheck disable=SC2001
TIME_INTERVAL=$(echo "${BACKUP_RETENTION}" | sed -e 's/[mhdM]$//')
+ # shellcheck disable=SC2001
TIME_UNIT=$(echo "${BACKUP_RETENTION}" | sed -e 's/^[0-9]\+//')
if [ "${TIME_UNIT}" = "m" ]; then