Skip to content

Commit 7a801cf

Browse files
committed
install_vim.sh: shellcheck / bail if VIM_BIN was not created
1 parent 21c3795 commit 7a801cf

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
@@ -182,7 +182,7 @@ build() {
182182
MAJOR="$(sed -n '/^MAJOR = / s~MAJOR = ~~p' Makefile)"
183183
if [ "$MAJOR" -lt 8 ]; then
184184
MINOR="$(sed -n '/^MINOR = / s~MINOR = ~~p' Makefile)"
185-
if [ "$MINOR" = "1" ] || [ "${MINOR#0}" != $MINOR ]; then
185+
if [ "$MINOR" = "1" ] || [ "${MINOR#0}" != "$MINOR" ]; then
186186
sed -i 's~sys/time.h termio.h~sys/time.h sys/types.h termio.h~' src/configure.in src/auto/configure
187187
fi
188188
fi
@@ -224,6 +224,9 @@ build() {
224224
else
225225
VIM_BIN="$INSTALL_PREFIX/bin/nvim"
226226
fi
227+
if ! [ -e "$VIM_BIN" ]; then
228+
bail "Binary $VIM_BIN was not created."
229+
fi
227230
link_target="/vim-build/bin/$NAME"
228231
if [ -e "$link_target" ]; then
229232
echo "WARNING: link target for $NAME exists already. Overwriting."

0 commit comments

Comments
 (0)