Closed GrahamDumpleton closed 8 years ago
True. Yes I'll check that if not starts with dash is a profile. As I said this was a fast a dirty script. To be honest nor site that I'll ever pass arguments. But good point.
El 23 sept. 2016 3:35, "Graham Dumpleton" notifications@github.com escribió:
In function up() have:
function up { local _profile="$1" echo "$_profile"
if [ "$_profile" == "" ] then echo "Using default profile" _profile="default" fi
...
shift # Remove profile name
This is going to conflict with idea that one can pass additional options through to oc cluster up. That is $@ in:
oc cluster up --public-hostname 127.0.0.1 \ --host-data-dir $OPENSHIFT_HOST_DATA_DIR \ --host-config-dir $OPENSHIFT_HOST_CONFIG_DIR \ --use-existing-config \ "$@"
The usage actually says:
oc-cluster up [profile] [OPTIONS]
which generally indicates that profile is optional.
If some were to say:
oc-cluster up --loglevel 9
then the profile name will be taken to be --loglevel and 9 passed through as sole argument to oc cluster up after default options.
So bit more sophisticated process required for options if going to allow additional options to be passed through.
Maybe that if supplied first argument starts with - that don't interpret as profile name, use default and not shift arguments.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jorgemoralespou/oc-cluster-wrapper/issues/1, or mute the thread https://github.com/notifications/unsubscribe-auth/AAEyDoYIit5wXx3sy4TYyIV0_UjYs2guks5qsyzDgaJpZM4KEhoX .
In function
up()
have:This is going to conflict with idea that one can pass additional options through to
oc cluster up
. That is$@
in:The usage actually says:
which generally indicates that
profile
is optional.If some were to say:
then the profile name will be taken to be
--loglevel
and9
passed through as sole argument tooc cluster up
after default options.So bit more sophisticated process required for options if going to allow additional options to be passed through.
Maybe that if supplied first argument starts with
-
that don't interpret as profile name, use default and not shift arguments.