From 12e1401fc1cc1b66d283ea08a9185eb0f4bbfc43 Mon Sep 17 00:00:00 2001 From: David Windell Date: Mon, 26 Jun 2017 11:29:14 +0100 Subject: [PATCH] Add Alpine support to ls-json (#4947) * Add Alpine support to ls-json Signed-off-by: David Windell * Add nodejs if not installed Signed-off-by: David Windell --- .../resources/org.eclipse.che.ls.json.script.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/agents/ls-json/src/main/resources/org.eclipse.che.ls.json.script.sh b/agents/ls-json/src/main/resources/org.eclipse.che.ls.json.script.sh index c520fee1767..2f10505b902 100644 --- a/agents/ls-json/src/main/resources/org.eclipse.che.ls.json.script.sh +++ b/agents/ls-json/src/main/resources/org.eclipse.che.ls.json.script.sh @@ -139,6 +139,19 @@ elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then ${SUDO} zypper in nodejs } +# Alpine 3.3 +############ +elif echo ${LINUX_TYPE} | grep -qi "alpine"; then + test "${PACKAGES}" = "" || { + ${SUDO} apk update + ${SUDO} apk add ${PACKAGES}; + } + + command -v nodejs >/dev/null 2>&1 || { + ${SUDO} apk update + ${SUDO} apk add nodejs; + } + else >&2 echo "Unrecognized Linux Type" >&2 cat $FILE