Skip to content

Commit 6cab423

Browse files
committed
fix: allow user to specify custom guidebook store via -s flag
or GUIDEBOOK_STORE env var
1 parent 7df754f commit 6cab423

File tree

1 file changed

+11
-8
lines changed

1 file changed

+11
-8
lines changed

bin/codeflare

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,22 +96,25 @@ fi
9696
# This points the headless->electron launcher to our Electron
9797
export KUI_ELECTRON_HOME="${KUI_ELECTRON_HOME-$NODE}"
9898

99-
if [ -d "$HEADLESS"/../../store ]; then
100-
# development builds
101-
export GUIDEBOOK_STORE="$HEADLESS"/../../store
102-
else
103-
# otherwise, we can't find a local mirror, so pull directly from
104-
# git (network transfers!)
105-
export GUIDEBOOK_STORE=git
99+
if [ -z "$GUIDEBOOK_STORE" ]; then
100+
if [ -d "$HEADLESS"/../../store ]; then
101+
# development builds
102+
export GUIDEBOOK_STORE="$HEADLESS"/../../store
103+
else
104+
# otherwise, we can't find a local mirror, so pull directly from
105+
# git (network transfers!)
106+
export GUIDEBOOK_STORE=git
107+
fi
106108
fi
107109

108110
# check if the user wants us to run the graphical version (currently
109111
# indicated by the -u option)
110112
do_cli=1
111-
while getopts "u" opt
113+
while getopts "us:" opt
112114
do
113115
case $opt in
114116
(u) do_cli=0; shift; continue;;
117+
(s) GUIDEBOOK_STORE=$OPTARG; shift; shift; continue;;
115118
esac
116119
done
117120

0 commit comments

Comments
 (0)