shellcheck: fix warnings (#6274)

* Remove outdated files

* Fix warnings
This commit is contained in:
ᴜɴᴋɴᴡᴏɴ
2020-08-23 15:17:54 +08:00
committed by GitHub
parent a840ae9035
commit 92c5f94fe7
14 changed files with 25 additions and 104 deletions

View File

@@ -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