|
116 | 116 | case $opt in |
117 | 117 | d) use_docker=1; continue;; |
118 | 118 | u) do_cli=0; continue;; |
119 | | - s) GUIDEBOOK_STORE=$OPTARG; continue;; |
120 | | - *) EXTRAPREFIX="$EXTRAPREFIX -$opt"; continue;; |
| 119 | + s) export GUIDEBOOK_STORE=$OPTARG; continue;; |
| 120 | + *) continue;; |
121 | 121 | esac |
122 | 122 | done |
123 | | -shift $((OPTIND-1)) |
| 123 | +# shift $((OPTIND-1)) |
124 | 124 |
|
125 | 125 | if [ $use_docker = 1 ]; then |
126 | 126 | # launch inside a docker container |
127 | 127 | exec docker run -it --entrypoint ${ENTRYPOINT-codeflare} --rm -v /tmp:/tmp -v ~/.aws:/home/codeflare/.aws -v ~/.bluemix:/home/codeflare/.bluemix -v ~/.kube:/home/codeflare/.kube -e KUBECONFIG=$(echo $KUBECONFIG | sed "s/$USER/codeflare/g" | sed 's/Users/home/g') ghcr.io/project-codeflare/codeflare-cli -- $* |
128 | 128 | fi |
129 | 129 |
|
130 | | -if ([ $do_cli = 1 ] && [ $# = 0 ]) || ([ $# = 1 ] && [ "$1" != "version" ] && [ "$1" != "attach" ]); then |
131 | | - # TODO make this a kui command catchall |
132 | | - # use the "guide" command if none was given |
133 | | - EXTRAPREFIX="$EXTRAPREFIX guide" |
134 | | -fi |
135 | | - |
136 | 130 | if [ "$do_cli" = "1" ]; then |
137 | 131 | # launch headless version; here, we use madwizard directly, but |
138 | 132 | # using electron as the nodejs binary (this is what |
139 | 133 | # ELECTRON_RUN_AS_NODE does for us) |
140 | 134 | export KUI_HEADLESS=true |
141 | 135 | export KUI_S3=false # we don't need plugin-s3 capabilities when in headless mode |
142 | 136 | export ELECTRON_RUN_AS_NODE=true |
143 | | -# export MWSTORE="$GUIDEBOOK_STORE" |
144 | | -# exec "$NODE" \ |
145 | | -# --experimental-specifier-resolution=node --no-warnings --experimental-import-meta-resolve \ |
146 | | -# "$HEADLESS"/../../node_modules/madwizard/bin/madwizard.js \ |
147 | | -# $* |
148 | | -elif [ $# -gt 0 ]; then |
149 | | - # tell the command handlers to run in UI mode |
150 | | - EXTRAPREFIX="$EXTRAPREFIX -u" |
151 | 137 | fi |
152 | 138 |
|
153 | 139 | # Linux may not have the prereqs needed to run Electron |
|
176 | 162 | trap 'pkill -P $$; exit 1;' TERM INT |
177 | 163 |
|
178 | 164 | # otherwise, we launch the UI version |
179 | | -"$NODE" "$HEADLESS"/codeflare.min.js -- $EXTRAPREFIX $* |
| 165 | +"$NODE" "$HEADLESS"/codeflare.min.js -- codeflare $EXTRAPREFIX "$@" |
0 commit comments