From 6d465d8ae860354fa7ac271f8067ebfbb8ab40a5 Mon Sep 17 00:00:00 2001 From: Lewis Sparlin Date: Wed, 5 Dec 2018 08:58:05 -0600 Subject: [PATCH] Added easy support for Spanish version in docker environment --- Dockerfile | 4 ++-- README.md | 5 +++++ tree-ENV_LANG.sh | 7 +++++++ 3 files changed, 14 insertions(+), 2 deletions(-) create mode 100755 tree-ENV_LANG.sh diff --git a/Dockerfile b/Dockerfile index c89fc9d..b28a794 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,5 @@ FROM alpine:latest -COPY tree-EN.sh /tree-EN.sh +COPY tree-EN.sh tree-ES.sh tree-ENV_LANG.sh / RUN apk add --update ncurses bash ENV TERM=xterm-256color -CMD ["bash","/tree-EN.sh"] +CMD ["bash","/tree-ENV_LANG.sh"] diff --git a/README.md b/README.md index a19a236..c25a843 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,12 @@ Docker: ``` docker pull sergiolepore/christbashtree:latest + +# English Version docker run -it sergiolepore/christbashtree:latest + +# Spanish Version +docker run -it -e BASH_TREE_LANG=ES sergiolepore/christbashtree:latest ``` Git clone and execute: diff --git a/tree-ENV_LANG.sh b/tree-ENV_LANG.sh new file mode 100755 index 0000000..26ff2c1 --- /dev/null +++ b/tree-ENV_LANG.sh @@ -0,0 +1,7 @@ +#!/bin/bash +if [ $BASH_TREE_LANG = "ES" ] +then + ./tree-ES.sh +else + ./tree-EN.sh +fi