Skip to content

Commit

Permalink
Don't depend on $0 for finding help text
Browse files Browse the repository at this point in the history
  • Loading branch information
mfeit-internet2 committed Feb 13, 2024
1 parent 9fa0871 commit 6dcec2c
Showing 1 changed file with 22 additions and 28 deletions.
50 changes: 22 additions & 28 deletions install-perfsonar
Original file line number Diff line number Diff line change
Expand Up @@ -2,40 +2,34 @@
#
# Install perfSONAR
#
#BEGIN-HELP
#
# Usage: install-perfsonar [ OPTIONS ] BUNDLE
#
# BUNDLE is one of tools, core, testpoint, toolkit or archive.
#
# OPTIONS:
#
# --auto-updates Enable automatic updates
# --security Install security package
# --tunings Install system tunings
# --dry-run Don't do anything
# --ps-repo-version V Use perfSONAR repo verion V on EL systems
#
# Example usage from GitHub:
#
# curl -s TODO:URL \
# | sh -s - --auto-updates --tunings testpoint
#
#END-HELP

usage()
{
cat <<EOF
# -----------------------------------------------------------------------------
Usage: install-perfsonar [ OPTIONS ] BUNDLE
# Utilities
BUNDLE is one of tools, core, testpoint, toolkit or archive.
usage()
{
sed -n -e '/^#BEGIN-HELP/,/^#END-HELP/{
s/^#//;
/^BEGIN-HELP/! { /^END-HELP/! p }
}' "$0"
OPTIONS:
--auto-updates Enable automatic updates
--security Install security package
--tunings Install system tunings
--dry-run Don't do anything
--ps-repo-version V Use perfSONAR repo verion V on EL systems
Example usage from GitHub:
curl -s TODO:URL \\
| sh -s - --auto-updates --tunings testpoint
EOF
}

# -----------------------------------------------------------------------------

# Utilities

warn()
{
Expand Down

0 comments on commit 6dcec2c

Please sign in to comment.