[Git][NTPsec/ntpsec][master] ntpleapfetch: Fix sed on FreeBSD and osX.
Gary E. Miller
gitlab at mg.gitlab.com
Sat Dec 8 00:00:48 UTC 2018
Gary E. Miller pushed to branch master at NTPsec / ntpsec
Commits:
624070c9 by Gary E. Miller at 2018-12-07T23:59:10Z
ntpleapfetch: Fix sed on FreeBSD and osX.
FreeBSD sed is dumber than GNU sed. The input filename must be last.
- - - - -
1 changed file:
- ntpclients/ntpleapfetch
Changes:
=====================================
ntpclients/ntpleapfetch
=====================================
@@ -11,6 +11,12 @@
# Depends on:
# wget sed, tr, shasum/sha1sum, logger
+#
+# This file needs to remain free of bash-isms. Make sure it
+# runs on plain POSIX shell.
+
+# GNU sed has many extentions not on osX and FreeBSD. If
+# you change near sed, test on FreeBSD.
# ########## Default configuration ##########
#
@@ -284,7 +290,7 @@ verifySHA1() {
# Remove comments, except those that are markers for last update, expires and hash
- local RAW="`sed $1 -e'/^\\([0-9]\\|#[\$@h]\)/!d' -e'/^#[\$@h]/!s/#.*\$//g'`"
+ local RAW="`sed -e'/^\\([0-9]\\|#[\$@h]\)/!d' -e'/^#[\$@h]/!s/#.*\$//g' $1`"
# Extract just the data, removing all whitespace
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/624070c9f9ca1c0ae458a1e9192778e0d42b5fec
--
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/624070c9f9ca1c0ae458a1e9192778e0d42b5fec
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20181208/a4977434/attachment.html>
More information about the vc
mailing list