Mercurial > hgrepos > FreeBSD > ports > sysutils > local-bsdtools
comparison share/local-bsdtools/common.subr @ 639:4dded1830266
common.subr: Do not use $'...' where not needed
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Fri, 27 Sep 2024 13:22:11 +0200 |
| parents | 3ac8fec90c96 |
| children | b8b07ff189f6 |
comparison
equal
deleted
inserted
replaced
| 638:3ac8fec90c96 | 639:4dded1830266 |
|---|---|
| 405 [ -z "${_dsname}" ] && fatal 2 "no dataset given" | 405 [ -z "${_dsname}" ] && fatal 2 "no dataset given" |
| 406 | 406 |
| 407 if [ -x "${JQ}" ]; then | 407 if [ -x "${JQ}" ]; then |
| 408 /sbin/mount -t zfs -p --libxo=json,no-locale \ | 408 /sbin/mount -t zfs -p --libxo=json,no-locale \ |
| 409 | LC_ALL=C.UTF-8 "${JQ}" -r $'.mount.fstab[] | [.device, .mntpoint, .fstype, .opts, .dump, .pass] | @tsv ' \ | 409 | LC_ALL=C.UTF-8 "${JQ}" -r $'.mount.fstab[] | [.device, .mntpoint, .fstype, .opts, .dump, .pass] | @tsv ' \ |
| 410 | LC_ALL=C.UTF-8 /usr/bin/awk -F $'\\t' -v OFS=$'\t' -v ds1="${_dsname}" -v ds2="${_dsname}/" $'{ if (($1 == ds1) || (index($1, ds2) == 1)) { print $1, $2, $3, $4, $5, $6; } }' \ | 410 | LC_ALL=C.UTF-8 /usr/bin/awk -F '\t' -v OFS=$'\t' -v ds1="${_dsname}" -v ds2="${_dsname}/" $'{ if (($1 == ds1) || (index($1, ds2) == 1)) { print $1, $2, $3, $4, $5, $6; } }' \ |
| 411 | LC_ALL=C.UTF-8 /usr/bin/sort --field-separator=$'\t' --key=2 ${_opt_reversed} | 411 | LC_ALL=C.UTF-8 /usr/bin/sort --field-separator=$'\t' --key=2 ${_opt_reversed} |
| 412 else | 412 else |
| 413 # Check for unexpected spaces | 413 # Check for unexpected spaces |
| 414 if ! check_for_proper_fstab; then | 414 if ! check_for_proper_fstab; then |
| 415 fatal 1 "Unexpected spaces in fstab. Please install \`${JQ}'." | 415 fatal 1 "Unexpected spaces in fstab. Please install \`${JQ}'." |
| 486 ;; | 486 ;; |
| 487 esac | 487 esac |
| 488 if [ -x "${JQ}" ]; then | 488 if [ -x "${JQ}" ]; then |
| 489 /sbin/mount -p --libxo=json,no-locale \ | 489 /sbin/mount -p --libxo=json,no-locale \ |
| 490 | LC_ALL=C.UTF-8 "${JQ}" -r $'.mount.fstab[] | [.device, .mntpoint, .fstype, .opts, .dump, .pass] | @tsv ' \ | 490 | LC_ALL=C.UTF-8 "${JQ}" -r $'.mount.fstab[] | [.device, .mntpoint, .fstype, .opts, .dump, .pass] | @tsv ' \ |
| 491 | LC_ALL=C.UTF-8 /usr/bin/awk -F $'\\t' -v OFS=$'\t' -v mp1="${_mp1}" -v mp2="${_mp2}" $'{ if (($2 == mp1) || (index($2, mp2) == 1)) { print; } }' \ | 491 | LC_ALL=C.UTF-8 /usr/bin/awk -F '\t' -v OFS=$'\t' -v mp1="${_mp1}" -v mp2="${_mp2}" $'{ if (($2 == mp1) || (index($2, mp2) == 1)) { print; } }' \ |
| 492 | LC_ALL=C.UTF-8 /usr/bin/sort --field-separator=$'\t' --key=2 ${_opt_reversed} | 492 | LC_ALL=C.UTF-8 /usr/bin/sort --field-separator=$'\t' --key=2 ${_opt_reversed} |
| 493 else | 493 else |
| 494 # Check for unexpected spaces | 494 # Check for unexpected spaces |
| 495 if ! check_for_proper_fstab; then | 495 if ! check_for_proper_fstab; then |
| 496 fatal 1 "Unexpected spaces in fstab. Please install \`${JQ}'." | 496 fatal 1 "Unexpected spaces in fstab. Please install \`${JQ}'." |
