Skip to content

Commit

Permalink
Remove bash
Browse files Browse the repository at this point in the history
This requires to install ncurses explicitly, which was installed as a
dep for bash before, and Vim requires it.

Ref: Vimjas#20 (comment)
  • Loading branch information
blueyed committed Mar 25, 2017
1 parent bd22b38 commit a0467d3
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
5 changes: 1 addition & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
FROM alpine:3.5

RUN apk --update add bash \
&& rm -rf /var/cache/apk/* /tmp/* /var/tmp/*

RUN adduser -h /home -s /bin/bash -D -u 8465 vimtest
RUN adduser -h /home -s /bin/sh -D -u 8465 vimtest

RUN mkdir -p /vim /vim-build/bin /plugins
RUN chown vimtest:vimtest /home /plugins
Expand Down
2 changes: 1 addition & 1 deletion scripts/argecho.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

echo "Running as: $(whoami)"

Expand Down
4 changes: 3 additions & 1 deletion scripts/install_vim.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/bin/bash
#!/bin/sh

set -e

Expand All @@ -20,6 +20,8 @@ build() {
[ -z $NAME ] && NAME="vim-${TAG}"
[ -z $TAG ] && bail "-tag is required"

apk add ncurses

VIM_NAME="vim_${TAG}_py${PYTHON}_rb${RUBY}_lua${LUA}"
VIM_PATH="/vim-build/$VIM_NAME"
VIM_BIN="$VIM_PATH/bin/vim"
Expand Down
6 changes: 3 additions & 3 deletions scripts/run_vim.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash
#!/bin/sh

BIN=$1
shift

if [ "$BIN" == "bash" ] || [ -z "$BIN" ]; then
exec /bin/bash
if [ "$BIN" = "sh" ] || [ -z "$BIN" ]; then
exec /bin/sh
fi
if ! [ -x "/vim-build/bin/$BIN" ]; then
exec "$BIN" "$@"
Expand Down

0 comments on commit a0467d3

Please sign in to comment.