Skip to content

Commit 9e0ad22

Browse files
committed
Clean-up of expansion of selection of binary
1 parent 1301f0a commit 9e0ad22

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

scripts/build

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,15 +105,18 @@ if [[ ! -d $STEP_DIR ]]; then
105105
eval "$NPMi" -g $SINGLE_USER || exit 24
106106

107107
# Set `/init` to package binary or `server.js` file
108-
PACKAGE_JSON=$STEP_DIR/lib/node_modules/$SINGLE_USER/package.json
108+
MODULE=lib/node_modules/$SINGLE_USER
109+
PACKAGE_JSON=$STEP_DIR/$MODULE/package.json
110+
SERVER=$MODULE/server.js
111+
109112
(
110113
BIN=bin/`pkg-bin $PACKAGE_JSON` && \
111114
ls $STEP_DIR/$BIN && \
112115
ln -fs $BIN $STEP_DIR/init
113116
) \
114-
|| (
115-
SERVER=lib/node_modules/$SINGLE_USER/server.js && \
116-
ls $STEP_DIR/$SERVER && \
117+
|| \
118+
(
119+
ls $STEP_DIR/$SERVER && \
117120
ln -fs $SERVER $STEP_DIR/init
118121
) \
119122
|| exit 25

0 commit comments

Comments
 (0)