aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBenjamin Linskey2025-11-13 23:06:19 -0500
committerBenjamin Linskey2025-11-13 23:08:36 -0500
commit283fda23ac3aa2329d698d560e1466cd98b58cb3 (patch)
tree5303f3c622be9677cdbfda0c6f6d731f3e5bdcf1
parent74b7a1ad39fe4e77f10ae148bf91dd03d51f4862 (diff)
downloadzfs-snapshots-283fda23ac3aa2329d698d560e1466cd98b58cb3.tar.gz

Improve documentation comments and usage text

-rwxr-xr-xsnapshots.sh16
1 files changed, 8 insertions, 8 deletions
diff --git a/snapshots.sh b/snapshots.sh
index 3f60bd6..747e469 100755
--- a/snapshots.sh
+++ b/snapshots.sh
@@ -14,7 +14,7 @@
# ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
-# snapshots.sh -- Manages ZFS snapshots.
+# snapshots.sh -- Manages ZFS snapshots
#
# At least one of the following options must be provided to specify an
# operation to perform:
@@ -33,7 +33,7 @@
# specify a tag.
#
# If the -p option is specified, the -k option must be provided to specify the
-# number of snapshots to keep for each dataset (including any newly created
+# number of snapshots to keep for each dataset (inclusive of any newly created
# snapshots).
#
# Usage: snapshots.sh [-cplrnvh] [-t tag] [-k num] [dataset ...]"
@@ -46,9 +46,9 @@
# actually modify data
# -v verbose mode
# -h print usage
-# -k num keep *num* snapshots for each dataset, including any newly
+# -k num keep <num> snapshots for each dataset, including any newly
# created snapshots
-# -t tag use *tag* as the snapshot name prefix
+# -t tag use <tag> as the snapshot name prefix
set -e
@@ -73,25 +73,25 @@ check_args() {
fi
if [ "$#" -eq 0 ] && { [ -n "$create" ] || [ -n "$prune" ]; }; then
- printf "At least one dataset must be specified\n"
+ printf "At least one dataset must be specified.\n"
usage
exit 1
fi
if { [ -n "$create" ] || [ -n "$prune" ]; } && [ -z "$tag" ]; then
- printf "Missing -t option\n"
+ printf "Missing -t option.\n"
usage
exit 1
fi
if [ -n "$prune" ] && [ -z "$keep" ]; then
- printf "Missing -k option\n"
+ printf "Missing -k option.\n"
usage
exit 1
fi
if [ -z "$prune" ] && [ -n "$keep" ]; then
- printf "\-k option is only valid with -p\n"
+ printf "\-k option is only valid with -p.\n"
usage
exit 1
fi