Skip to content

Commit b66d8ad

Browse files
committed
install_vim.sh: shellcheck / bail if VIM_BIN was not created
1 parent bd17253 commit b66d8ad

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

scripts/install_vim.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ build() {
191191
MAJOR="$(sed -n '/^MAJOR = / s~MAJOR = ~~p' Makefile)"
192192
if [ "$MAJOR" -lt 8 ]; then
193193
MINOR="$(sed -n '/^MINOR = / s~MINOR = ~~p' Makefile)"
194-
if [ "$MINOR" = "1" ] || [ "${MINOR#0}" != $MINOR ]; then
194+
if [ "$MINOR" = "1" ] || [ "${MINOR#0}" != "$MINOR" ]; then
195195
sed -i 's~sys/time.h termio.h~sys/time.h sys/types.h termio.h~' src/configure.in src/auto/configure
196196
fi
197197
fi
@@ -233,6 +233,9 @@ build() {
233233
else
234234
VIM_BIN="$INSTALL_PREFIX/bin/nvim"
235235
fi
236+
if ! [ -e "$VIM_BIN" ]; then
237+
bail "Binary $VIM_BIN was not created."
238+
fi
236239
link_target="/vim-build/bin/$NAME"
237240
if [ -e "$link_target" ]; then
238241
echo "WARNING: link target for $NAME exists already. Overwriting."

0 commit comments

Comments
 (0)