Fix compatibility with OpenBSD #79
No reviewers
Labels
No labels
bkctld
bug
duplicate
enhancement
invalid
question
wontfix
zzz_evobackup
No milestone
No project
No assignees
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: evolix/evobackup#79
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "openbsd-compatibility"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
readlink
: option "-m" does not exist on OpenBSD, option "-f" exists on both Debian and OpenBSDSERVER_IP
: no reason not to first use curl on OpenBSD toodate
: option "--iso-8601=seconds" does not exist on OpenBSD (and "%:z" neither) ; "+%FT%T%z" works on both Debian and OpenBSD but we loose the ":" in "+01:00" for the time zoneSeems good to me.
@ -2,3 +2,3 @@
# shellcheck disable=SC2155
readonly PROGPATH=$(readlink -m "${0}")
readonly PROGPATH=$(readlink -f "${0}")
While there is a difference in behavior between
readlink -f
andreadlink -m
that doesn't matter here (if${0}
is a path (which isn't really guaranteed) it has to point to this file so every component of the path exist).@ -80,3 +80,3 @@
# Insert metadata about the template
sed -i "s|@COMMAND@|${PROGPATH} ${ARGS}|" "${dest_path}"
sed -i "s|@DATE@|$(date --iso-8601=seconds)|" "${dest_path}"
sed -i "s|@DATE@|$(date +%FT%T%z)|" "${dest_path}" # option "--iso-8601=seconds" does not exist on OpenBSD (and "%:z" neither)
Seems good. I'm not certain the comment is really needed though.
I have just extracted two methods for the server IP.
Otherwise, it's good for me. OK to merge