fixeria has submitted this change. ( https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/40766?usp=email )
( 1 is the latest approved patch-set. No files were changed between the latest approved patch-set and the submitted one. )Change subject: contrib/osmo-s1gw.sh: add help ...................................................................... contrib/osmo-s1gw.sh: add help Change-Id: Id6ff9af8b7ec6602b4d8316d9ba499b59a483271 --- M contrib/osmo-s1gw.sh 1 file changed, 19 insertions(+), 1 deletion(-) Approvals: laforge: Looks good to me, but someone else must approve pespin: Looks good to me, approved Jenkins Builder: Verified diff --git a/contrib/osmo-s1gw.sh b/contrib/osmo-s1gw.sh index 385f981..5d3e8dd 100755 --- a/contrib/osmo-s1gw.sh +++ b/contrib/osmo-s1gw.sh @@ -19,6 +19,19 @@ NODE_NAME="${APP_NAME}@$(uname -n)" ERL_SHELL="-noshell -noinput" +print_usage() { + echo "Usage: $0 [-s] [-r ROOTDIR] [-c CONFIG] [-C COOKIE] [-n NAME@HOST]" +} + +print_help() { + echo " -h This message" + echo " -s Enable interactive shell" + echo " -r Application's root directory (default: ${ROOTDIR})" + echo " -c Config file path (default: ${CONFIG})" + echo " -C Erlang node cookie (default: ${COOKIE})" + echo " -n Erlang node name (default: ${NODE_NAME})" +} + # Parse command line options, if any while getopts "c:C:n:r:s" opt; do case "$opt" in @@ -37,8 +50,13 @@ s) ERL_SHELL="-shell" ;; + h) + print_usage + print_help + exit 1 + ;; *) - echo "Usage: $0 [-s] [-r ROOTDIR] [-c CONFIG] [-C COOKIE] [-n NAME@HOST]" + print_usage exit 1 ;; esac -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo-s1gw/+/40766?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: erlang/osmo-s1gw Gerrit-Branch: master Gerrit-Change-Id: Id6ff9af8b7ec6602b4d8316d9ba499b59a483271 Gerrit-Change-Number: 40766 Gerrit-PatchSet: 2 Gerrit-Owner: fixeria <vyanits...@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: fixeria <vyanits...@sysmocom.de> Gerrit-Reviewer: laforge <lafo...@osmocom.org> Gerrit-Reviewer: pespin <pes...@sysmocom.de>