Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
changeset 546:d28733400b18
Using jq: the '.a.b.c.["d"]' syntax in chains is 1.7+: use the old syntax '.a.b.c["d"]' instead.
Since 1.7 a dot is allowed.
See: https://github.com/jqlang/jq/issues/1168
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Tue, 10 Sep 2024 10:42:44 +0200 |
| parents | 566ecdd9e73b |
| children | f86041364bc1 |
| files | sbin/fzfs share/local-bsdtools/common.subr |
| diffstat | 2 files changed, 3 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/sbin/fzfs Tue Sep 10 10:13:59 2024 +0200 +++ b/sbin/fzfs Tue Sep 10 10:42:44 2024 +0200 @@ -310,7 +310,7 @@ if [ -x "${JQ}" ]; then /sbin/mount -t zfs -p --libxo=json,no-locale \ - | LC_ALL=C "${JQ}" -r $'.mount.fstab.[] | [.device, .mntpoint, .fstype, .opts, .dump, .pass] | @tsv ' \ + | LC_ALL=C "${JQ}" -r $'.mount.fstab[] | [.device, .mntpoint, .fstype, .opts, .dump, .pass] | @tsv ' \ | LC_ALL=C /usr/bin/awk -F $'\\t+' -v OFS=$'\t' -v ds1="${_dsname}" -v ds2="${_dsname}/" $'{ if (($1 == ds1) || (index($1, ds2) == 1)) { print $1, $2; } }' \ | LC_ALL=C /usr/bin/sort -t $'\t' -k 1 -r \ | while IFS=$'\t' read -r _name _mp ; do
--- a/share/local-bsdtools/common.subr Tue Sep 10 10:13:59 2024 +0200 +++ b/share/local-bsdtools/common.subr Tue Sep 10 10:42:44 2024 +0200 @@ -225,7 +225,7 @@ if [ -x "${JQ}" ]; then /sbin/mount -t zfs -p --libxo=json,no-locale \ - | LC_ALL=C "${JQ}" -r $'.mount.fstab.[] | [.device, .mntpoint, .fstype, .opts, .dump, .pass] | @tsv ' \ + | LC_ALL=C "${JQ}" -r $'.mount.fstab[] | [.device, .mntpoint, .fstype, .opts, .dump, .pass] | @tsv ' \ | { while IFS=$'\t' read -r _ds _mount _rest ; do if [ "$_mount" = "$_mountpoint" ]; then @@ -391,7 +391,7 @@ esac if [ -x "${JQ}" ]; then /sbin/mount -p --libxo=json,no-locale \ - | LC_ALL=C "${JQ}" -r $'.mount.fstab.[] | [.device, .mntpoint, .fstype, .opts, .dump, .pass] | @tsv ' \ + | LC_ALL=C "${JQ}" -r $'.mount.fstab[] | [.device, .mntpoint, .fstype, .opts, .dump, .pass] | @tsv ' \ | LC_ALL=C /usr/bin/awk -F $'\\t+' -v OFS=$'\t' -v ds1="${_directory}" -v ds2="${_directory}/" $'{ if (($2 == ds1) || (index($2, ds2) == 1)) { print; } }' \ | LC_ALL=C /usr/bin/sort -t $'\t' -k1 else
