mirror of
https://github.com/lobaro/restic-backup-docker.git
synced 2026-11-21 00:56:52 +00:00
test: print only the comment header for run.sh --help
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8607aa441c
commit
e4016ef8fe
1 file changed
+1
-1
+1
-1
@@ -45,7 +45,7 @@ while [ $# -gt 0 ]; do
|
|||||||
--suite=*)
|
--suite=*)
|
||||||
ONLY_SUITE="${1#--suite=}"
|
ONLY_SUITE="${1#--suite=}"
|
||||||
[ -n "$ONLY_SUITE" ] || { echo "--suite requires a value (compat|features|structure)" >&2; exit 2; } ;;
|
[ -n "$ONLY_SUITE" ] || { echo "--suite requires a value (compat|features|structure)" >&2; exit 2; } ;;
|
||||||
-h|--help) sed -n '2,14p' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
|
-h|--help) sed -n '2,/^$/{/^#/p;}' "$0" | sed 's/^# \{0,1\}//'; exit 0 ;;
|
||||||
*) echo "unknown argument: $1" >&2; exit 2 ;;
|
*) echo "unknown argument: $1" >&2; exit 2 ;;
|
||||||
esac
|
esac
|
||||||
shift
|
shift
|
||||||
|
|||||||
Reference in new issue
Block a user