Skip to content

Commit

Permalink
Tell shfmt to allow column spacing, and align some stuff
Browse files Browse the repository at this point in the history
Runs acts through the ol' OCD filter
  • Loading branch information
assistcontrol committed Jun 25, 2019
1 parent 02955c7 commit 1efbdba
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ dist:
check:
if command -v shellcheck >/dev/null; then shellcheck -e SC1091 acts; fi
if command -v shellcheck >/dev/null; then shellcheck -e SC2034 acts.conf.sample; fi
if command -v shfmt >/dev/null; then shfmt -i 4 -d acts; fi
if command -v shfmt >/dev/null; then shfmt -i 4 -d acts.conf.sample; fi
if command -v shfmt >/dev/null; then shfmt -i 4 -d -kp acts; fi
if command -v shfmt >/dev/null; then shfmt -i 4 -d -kp acts.conf.sample; fi

.PHONY: \
check \
Expand Down
10 changes: 5 additions & 5 deletions acts
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,9 @@ else
die "config-error message=\"invalid \$uselocaltime in acts.conf; valid options are 0 (for UTC) or 1 (for local time).\""
fi

[ $((dailybackups)) = "$dailybackups" ] || die "config-error message=\"Invalid \$dailybackups; must be a number.\""
[ $((dailybackups)) = "$dailybackups" ] || die "config-error message=\"Invalid \$dailybackups; must be a number.\""
[ $((monthlybackups)) = "$monthlybackups" ] || die "config-error message=\"Invalid \$monthlybackups; must be a number.\""
[ $((yearlybackups)) = "$yearlybackups" ] || die "config-error message=\"Invalid \$yearlybackups; must be a number.\""
[ $((yearlybackups)) = "$yearlybackups" ] || die "config-error message=\"Invalid \$yearlybackups; must be a number.\""

# Create the lock. mkdir is atomic test/set, so use that instead of the typical test -f/touch combo
if [ -d "$lockfile" ]; then
Expand Down Expand Up @@ -155,7 +155,7 @@ archives=$(echo "$archives_unsorted" | sort -n)
# When is now?
# Instead of re-running date, be paranoid the day was microseconds away from ending
today=$(date $utc "+%Y-%m-%d_%H:%M:%S")
year=$(echo "$today" | cut -d_ -f1 | cut -d- -f1)
year=$( echo "$today" | cut -d_ -f1 | cut -d- -f1)
month=$(echo "$today" | cut -d_ -f1 | cut -d- -f2)
# day=$(echo "$today" | cut -d_ -f1 | cut -d- -f3) # unused

Expand Down Expand Up @@ -253,9 +253,9 @@ for dir in $backuptargets; do
log_debug "message=\"Checking $dir for old backups to delete\""
nicedirname=$(nicedirname "$dir")

prune_backups yearly $yearlybackups
prune_backups yearly $yearlybackups
prune_backups monthly $monthlybackups
prune_backups daily $dailybackups
prune_backups daily $dailybackups
done

# Run the post-backup script
Expand Down

0 comments on commit 1efbdba

Please sign in to comment.