Skip unnecessary package installation (#3427)

Signed-off-by: Eugene Ivantsov <eivantsov@codenvy.com>
6.19.x
Eugene Ivantsov 2016-12-19 13:32:58 +02:00 committed by GitHub
parent 872e88e182
commit b676d3ae73
14 changed files with 25 additions and 25 deletions

View File

@ -5,5 +5,5 @@
"dependencies": [],
"properties": {
},
"script" : "#\n# Copyright (c) 2012-2016 Codenvy, S.A.\n# All rights reserved. This program and the accompanying materials\n# are made available under the terms of the Eclipse Public License v1.0\n# which accompanies this distribution, and is available at\n# http://www.eclipse.org/legal/epl-v10.html\n#\n# Contributors:\n# Codenvy, S.A. - initial API and implementation\n#\n\nunset PACKAGES\nunset SUDO\ncommand -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" tar\"; }\ncommand -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" curl\"; }\ntest \"$(id -u)\" = 0 || SUDO=\"sudo\"\n\nAGENT_BINARIES_URI=https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.json.binaries\nCHE_DIR=$HOME/che\nLS_DIR=${CHE_DIR}/ls-json\nLS_LAUNCHER=${LS_DIR}/launch.sh\n\nif [ -f /etc/centos-release ]; then\n FILE=\"/etc/centos-release\"\n LINUX_TYPE=$(cat $FILE | awk '{print $1}')\n elif [ -f /etc/redhat-release ]; then\n FILE=\"/etc/redhat-release\"\n LINUX_TYPE=$(cat $FILE | cut -c 1-8)\n else\n FILE=\"/etc/os-release\"\n LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]')\n LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=)\nfi\n\nMACHINE_TYPE=$(uname -m)\n\nmkdir -p ${CHE_DIR}\nmkdir -p ${LS_DIR}\n\n########################\n### Install packages ###\n########################\n\n# Red Hat Enterprise Linux 7\n############################\nif echo ${LINUX_TYPE} | grep -qi \"rhel\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;\n ${SUDO} yum -y install nodejs;\n }\n\n# Red Hat Enterprise Linux 6\n############################\nelif echo ${LINUX_TYPE} | grep -qi \"Red Hat\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;\n ${SUDO} yum -y install nodejs;\n }\n\n\n# Ubuntu 14.04 16.04 / Linux Mint 17\n####################################\nelif echo ${LINUX_TYPE} | grep -qi \"ubuntu\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n {\n if test \"${SUDO}\" = \"\"; then\n curl -sL https://deb.nodesource.com/setup_6.x | bash -;\n else\n curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} -E bash -;\n fi\n };\n\n ${SUDO} apt-get update;\n ${SUDO} apt-get install -y nodejs;\n }\n\n\n# Debian 8\n##########\nelif echo ${LINUX_TYPE} | grep -qi \"debian\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n {\n if test \"${SUDO}\" = \"\"; then\n curl -sL https://deb.nodesource.com/setup_6.x | bash -;\n else\n curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} -E bash -;\n fi\n };\n\n ${SUDO} apt-get update;\n ${SUDO} apt-get install -y nodejs;\n }\n\n# Fedora 23\n###########\nelif echo ${LINUX_TYPE} | grep -qi \"fedora\"; then\n PACKAGES=${PACKAGES}\" procps-ng\"\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} dnf -y install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;\n ${SUDO} dnf -y install nodejs;\n }\n\n\n# CentOS 7.1 & Oracle Linux 7.1\n###############################\nelif echo ${LINUX_TYPE} | grep -qi \"centos\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;\n ${SUDO} yum -y install nodejs;\n }\n\n# openSUSE 13.2\n###############\nelif echo ${LINUX_TYPE} | grep -qi \"opensuse\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} zypper install -y ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n ${SUDO} zypper ar http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1/ Node.js\n ${SUDO} zypper in nodejs\n }\n\nelse\n >&2 echo \"Unrecognized Linux Type\"\n >&2 cat $FILE\n exit 1\nfi\n\n\n#####################\n### Install C# LS ###\n#####################\n\ncurl -s ${AGENT_BINARIES_URI} | tar xzf - -C ${LS_DIR}\n\ntouch ${LS_LAUNCHER}\nchmod +x ${LS_LAUNCHER}\necho \"nodejs ${LS_DIR}/vscode-json-server/server.js\" > ${LS_LAUNCHER}"
"script" : "#\n# Copyright (c) 2012-2016 Codenvy, S.A.\n# All rights reserved. This program and the accompanying materials\n# are made available under the terms of the Eclipse Public License v1.0\n# which accompanies this distribution, and is available at\n# http://www.eclipse.org/legal/epl-v10.html\n#\n# Contributors:\n# Codenvy, S.A. - initial API and implementation\n#\n\nunset PACKAGES\nunset SUDO\ncommand -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" tar\"; }\ncommand -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" curl\"; }\ntest \"$(id -u)\" = 0 || SUDO=\"sudo\"\n\nAGENT_BINARIES_URI=https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.json.binaries\nCHE_DIR=$HOME/che\nLS_DIR=${CHE_DIR}/ls-json\nLS_LAUNCHER=${LS_DIR}/launch.sh\n\nif [ -f /etc/centos-release ]; then\n FILE=\"/etc/centos-release\"\n LINUX_TYPE=$(cat $FILE | awk '{print $1}')\n elif [ -f /etc/redhat-release ]; then\n FILE=\"/etc/redhat-release\"\n LINUX_TYPE=$(cat $FILE | cut -c 1-8)\n else\n FILE=\"/etc/os-release\"\n LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]')\n LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=)\nfi\n\nMACHINE_TYPE=$(uname -m)\n\nmkdir -p ${CHE_DIR}\nmkdir -p ${LS_DIR}\n\n########################\n### Install packages ###\n########################\n\n# Red Hat Enterprise Linux 7\n############################\nif echo ${LINUX_TYPE} | grep -qi \"rhel\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;\n ${SUDO} yum -y install nodejs;\n }\n\n# Red Hat Enterprise Linux 6\n############################\nelif echo ${LINUX_TYPE} | grep -qi \"Red Hat\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;\n ${SUDO} yum -y install nodejs;\n }\n\n\n# Ubuntu 14.04 16.04 / Linux Mint 17\n####################################\nelif echo ${LINUX_TYPE} | grep -qi \"ubuntu\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n {\n if test \"${SUDO}\" = \"\"; then\n curl -sL https://deb.nodesource.com/setup_6.x | bash -;\n else\n curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} -E bash -;\n fi\n };\n\n ${SUDO} apt-get update;\n ${SUDO} apt-get install -y nodejs;\n }\n\n\n# Debian 8\n##########\nelif echo ${LINUX_TYPE} | grep -qi \"debian\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n {\n if test \"${SUDO}\" = \"\"; then\n curl -sL https://deb.nodesource.com/setup_6.x | bash -;\n else\n curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} -E bash -;\n fi\n };\n\n ${SUDO} apt-get update;\n ${SUDO} apt-get install -y nodejs;\n }\n\n# Fedora 23\n###########\nelif echo ${LINUX_TYPE} | grep -qi \"fedora\"; then\n command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" procps-ng\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} dnf -y install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;\n ${SUDO} dnf -y install nodejs;\n }\n\n\n# CentOS 7.1 & Oracle Linux 7.1\n###############################\nelif echo ${LINUX_TYPE} | grep -qi \"centos\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;\n ${SUDO} yum -y install nodejs;\n }\n\n# openSUSE 13.2\n###############\nelif echo ${LINUX_TYPE} | grep -qi \"opensuse\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} zypper install -y ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n ${SUDO} zypper ar http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1/ Node.js\n ${SUDO} zypper in nodejs\n }\n\nelse\n >&2 echo \"Unrecognized Linux Type\"\n >&2 cat $FILE\n exit 1\nfi\n\n\n#####################\n### Install C# LS ###\n#####################\n\ncurl -s ${AGENT_BINARIES_URI} | tar xzf - -C ${LS_DIR}\n\ntouch ${LS_LAUNCHER}\nchmod +x ${LS_LAUNCHER}\necho \"nodejs ${LS_DIR}/vscode-json-server/server.js\" > ${LS_LAUNCHER}"
}

View File

@ -4,5 +4,5 @@
"description": "PHP intellisense",
"dependencies": [],
"properties": {},
"script" : "#\n# Copyright (c) 2012-2016 Codenvy, S.A.\n# All rights reserved. This program and the accompanying materials\n# are made available under the terms of the Eclipse Public License v1.0\n# which accompanies this distribution, and is available at\n# http://www.eclipse.org/legal/epl-v10.html\n#\n# Contributors:\n# Codenvy, S.A. - initial API and implementation\n#\n\nunset PACKAGES\nunset SUDO\ncommand -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" tar\"; }\ncommand -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" curl\"; }\ntest \"$(id -u)\" = 0 || SUDO=\"sudo\"\n\nAGENT_BINARIES_URI=https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.php.binaries\nCHE_DIR=$HOME/che\nLS_DIR=${CHE_DIR}/ls-php\nLS_LAUNCHER=${LS_DIR}/launch.sh\n\nif [ -f /etc/centos-release ]; then\n FILE=\"/etc/centos-release\"\n LINUX_TYPE=$(cat $FILE | awk '{print $1}')\n elif [ -f /etc/redhat-release ]; then\n FILE=\"/etc/redhat-release\"\n LINUX_TYPE=$(cat $FILE | cut -c 1-8)\n else\n FILE=\"/etc/os-release\"\n LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]')\n LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=)\nfi\n\nMACHINE_TYPE=$(uname -m)\n\nmkdir -p ${CHE_DIR}\nmkdir -p ${LS_DIR}\n\n########################\n### Install packages ###\n########################\n\n# Red Hat Enterprise Linux 7\n############################\nif echo ${LINUX_TYPE} | grep -qi \"rhel\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum install ${PACKAGES};\n }\n\n# Red Hat Enterprise Linux 6\n############################\nelif echo ${LINUX_TYPE} | grep -qi \"Red Hat\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum install ${PACKAGES};\n }\n\n# Ubuntu 14.04 16.04 / Linux Mint 17\n####################################\nelif echo ${LINUX_TYPE} | grep -qi \"ubuntu\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n\n\n# Debian 8\n##########\nelif echo ${LINUX_TYPE} | grep -qi \"debian\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n\n# Fedora 23\n###########\nelif echo ${LINUX_TYPE} | grep -qi \"fedora\"; then\n PACKAGES=${PACKAGES}\" procps-ng\"\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} dnf -y install ${PACKAGES};\n }\n\n\n# CentOS 7.1 & Oracle Linux 7.1\n###############################\nelif echo ${LINUX_TYPE} | grep -qi \"centos\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n\n# openSUSE 13.2\n###############\nelif echo ${LINUX_TYPE} | grep -qi \"opensuse\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} zypper install -y ${PACKAGES};\n }\n\nelse\n >&2 echo \"Unrecognized Linux Type\"\n >&2 cat /etc/os-release\n exit 1\nfi\n\n\n######################\n### Install PHP LS ###\n######################\n\ncurl -s ${AGENT_BINARIES_URI} | tar xzf - -C ${LS_DIR}\n\ntouch ${LS_LAUNCHER}\nchmod +x ${LS_LAUNCHER}\necho \"export LD_LIBRARY_PATH=${LS_DIR}/php7-minimal\" > ${LS_LAUNCHER}\necho \"${LS_DIR}/php7-minimal/php -c ${LS_DIR}/php7-minimal/php.ini ${LS_DIR}/php-language-server/bin/php-language-server.php\" >> ${LS_LAUNCHER}"
"script" : "#\n# Copyright (c) 2012-2016 Codenvy, S.A.\n# All rights reserved. This program and the accompanying materials\n# are made available under the terms of the Eclipse Public License v1.0\n# which accompanies this distribution, and is available at\n# http://www.eclipse.org/legal/epl-v10.html\n#\n# Contributors:\n# Codenvy, S.A. - initial API and implementation\n#\n\nunset PACKAGES\nunset SUDO\ncommand -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" tar\"; }\ncommand -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" curl\"; }\ntest \"$(id -u)\" = 0 || SUDO=\"sudo\"\n\nAGENT_BINARIES_URI=https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.php.binaries\nCHE_DIR=$HOME/che\nLS_DIR=${CHE_DIR}/ls-php\nLS_LAUNCHER=${LS_DIR}/launch.sh\n\nif [ -f /etc/centos-release ]; then\n FILE=\"/etc/centos-release\"\n LINUX_TYPE=$(cat $FILE | awk '{print $1}')\n elif [ -f /etc/redhat-release ]; then\n FILE=\"/etc/redhat-release\"\n LINUX_TYPE=$(cat $FILE | cut -c 1-8)\n else\n FILE=\"/etc/os-release\"\n LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]')\n LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=)\nfi\n\nMACHINE_TYPE=$(uname -m)\n\nmkdir -p ${CHE_DIR}\nmkdir -p ${LS_DIR}\n\n########################\n### Install packages ###\n########################\n\n# Red Hat Enterprise Linux 7\n############################\nif echo ${LINUX_TYPE} | grep -qi \"rhel\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum install ${PACKAGES};\n }\n\n# Red Hat Enterprise Linux 6\n############################\nelif echo ${LINUX_TYPE} | grep -qi \"Red Hat\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum install ${PACKAGES};\n }\n\n# Ubuntu 14.04 16.04 / Linux Mint 17\n####################################\nelif echo ${LINUX_TYPE} | grep -qi \"ubuntu\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n\n\n# Debian 8\n##########\nelif echo ${LINUX_TYPE} | grep -qi \"debian\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n\n# Fedora 23\n###########\nelif echo ${LINUX_TYPE} | grep -qi \"fedora\"; then\n command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" procps-ng\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} dnf -y install ${PACKAGES};\n }\n\n\n# CentOS 7.1 & Oracle Linux 7.1\n###############################\nelif echo ${LINUX_TYPE} | grep -qi \"centos\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n\n# openSUSE 13.2\n###############\nelif echo ${LINUX_TYPE} | grep -qi \"opensuse\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} zypper install -y ${PACKAGES};\n }\n\nelse\n >&2 echo \"Unrecognized Linux Type\"\n >&2 cat /etc/os-release\n exit 1\nfi\n\n\n######################\n### Install PHP LS ###\n######################\n\ncurl -s ${AGENT_BINARIES_URI} | tar xzf - -C ${LS_DIR}\n\ntouch ${LS_LAUNCHER}\nchmod +x ${LS_LAUNCHER}\necho \"export LD_LIBRARY_PATH=${LS_DIR}/php7-minimal\" > ${LS_LAUNCHER}\necho \"${LS_DIR}/php7-minimal/php -c ${LS_DIR}/php7-minimal/php.ini ${LS_DIR}/php-language-server/bin/php-language-server.php\" >> ${LS_LAUNCHER}"
}

View File

@ -5,5 +5,5 @@
"dependencies": [],
"properties": {
},
"script" : "#\n# Copyright (c) 2012-2016 Codenvy, S.A.\n# All rights reserved. This program and the accompanying materials\n# are made available under the terms of the Eclipse Public License v1.0\n# which accompanies this distribution, and is available at\n# http://www.eclipse.org/legal/epl-v10.html\n#\n# Contributors:\n# Codenvy, S.A. - initial API and implementation\n#\n\nunset PACKAGES\nunset SUDO\ncommand -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" tar\"; }\ncommand -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" curl\"; }\ntest \"$(id -u)\" = 0 || SUDO=\"sudo\"\n\nAGENT_BINARIES_URI=https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.typescript.binaries\nCHE_DIR=$HOME/che\nLS_DIR=${CHE_DIR}/ls-typescript\nLS_LAUNCHER=${LS_DIR}/launch.sh\n\nif [ -f /etc/centos-release ]; then\n FILE=\"/etc/centos-release\"\n LINUX_TYPE=$(cat $FILE | awk '{print $1}')\n elif [ -f /etc/redhat-release ]; then\n FILE=\"/etc/redhat-release\"\n LINUX_TYPE=$(cat $FILE | cut -c 1-8)\n else\n FILE=\"/etc/os-release\"\n LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]')\n LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=)\nfi\n\nMACHINE_TYPE=$(uname -m)\n\nmkdir -p ${CHE_DIR}\nmkdir -p ${LS_DIR}\n\n########################\n### Install packages ###\n########################\n\n# Red Hat Enterprise Linux 7\n############################\nif echo ${LINUX_TYPE} | grep -qi \"rhel\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;\n ${SUDO} yum -y install nodejs;\n }\n\n# Red Hat Enterprise Linux 6\n############################\nelif echo ${LINUX_TYPE} | grep -qi \"Red Hat\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;\n ${SUDO} yum -y install nodejs;\n }\n\n\n# Ubuntu 14.04 16.04 / Linux Mint 17\n####################################\nelif echo ${LINUX_TYPE} | grep -qi \"ubuntu\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n {\n if test \"${SUDO}\" = \"\"; then\n curl -sL https://deb.nodesource.com/setup_6.x | bash -;\n else\n curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} -E bash -;\n fi\n };\n\n ${SUDO} apt-get update;\n ${SUDO} apt-get install -y nodejs;\n }\n\n\n# Debian 8\n##########\nelif echo ${LINUX_TYPE} | grep -qi \"debian\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n {\n if test \"${SUDO}\" = \"\"; then\n curl -sL https://deb.nodesource.com/setup_6.x | bash -;\n else\n curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} -E bash -;\n fi\n };\n\n ${SUDO} apt-get update;\n ${SUDO} apt-get install -y nodejs;\n }\n\n# Fedora 23\n###########\nelif echo ${LINUX_TYPE} | grep -qi \"fedora\"; then\n PACKAGES=${PACKAGES}\" procps-ng\"\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} dnf -y install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;\n ${SUDO} dnf -y install nodejs;\n }\n\n\n# CentOS 7.1 & Oracle Linux 7.1\n###############################\nelif echo ${LINUX_TYPE} | grep -qi \"centos\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;\n ${SUDO} yum -y install nodejs;\n }\n\n# openSUSE 13.2\n###############\nelif echo ${LINUX_TYPE} | grep -qi \"opensuse\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} zypper install -y ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n ${SUDO} zypper ar http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1/ Node.js\n ${SUDO} zypper in nodejs\n }\n\nelse\n >&2 echo \"Unrecognized Linux Type\"\n >&2 cat $FILE\n exit 1\nfi\n\n\n########################\n### Install JS-TS LS ###\n########################\n\ncurl -s ${AGENT_BINARIES_URI} | tar xzf - -C ${LS_DIR}\n\ntouch ${LS_LAUNCHER}\nchmod +x ${LS_LAUNCHER}\necho \"nodejs ${LS_DIR}/build/language-server-stdio.js\" > ${LS_LAUNCHER}"
"script" : "#\n# Copyright (c) 2012-2016 Codenvy, S.A.\n# All rights reserved. This program and the accompanying materials\n# are made available under the terms of the Eclipse Public License v1.0\n# which accompanies this distribution, and is available at\n# http://www.eclipse.org/legal/epl-v10.html\n#\n# Contributors:\n# Codenvy, S.A. - initial API and implementation\n#\n\nunset PACKAGES\nunset SUDO\ncommand -v tar >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" tar\"; }\ncommand -v curl >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" curl\"; }\ntest \"$(id -u)\" = 0 || SUDO=\"sudo\"\n\nAGENT_BINARIES_URI=https://codenvy.com/update/repository/public/download/org.eclipse.che.ls.typescript.binaries\nCHE_DIR=$HOME/che\nLS_DIR=${CHE_DIR}/ls-typescript\nLS_LAUNCHER=${LS_DIR}/launch.sh\n\nif [ -f /etc/centos-release ]; then\n FILE=\"/etc/centos-release\"\n LINUX_TYPE=$(cat $FILE | awk '{print $1}')\n elif [ -f /etc/redhat-release ]; then\n FILE=\"/etc/redhat-release\"\n LINUX_TYPE=$(cat $FILE | cut -c 1-8)\n else\n FILE=\"/etc/os-release\"\n LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]')\n LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=)\nfi\n\nMACHINE_TYPE=$(uname -m)\n\nmkdir -p ${CHE_DIR}\nmkdir -p ${LS_DIR}\n\n########################\n### Install packages ###\n########################\n\n# Red Hat Enterprise Linux 7\n############################\nif echo ${LINUX_TYPE} | grep -qi \"rhel\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;\n ${SUDO} yum -y install nodejs;\n }\n\n# Red Hat Enterprise Linux 6\n############################\nelif echo ${LINUX_TYPE} | grep -qi \"Red Hat\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;\n ${SUDO} yum -y install nodejs;\n }\n\n\n# Ubuntu 14.04 16.04 / Linux Mint 17\n####################################\nelif echo ${LINUX_TYPE} | grep -qi \"ubuntu\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n {\n if test \"${SUDO}\" = \"\"; then\n curl -sL https://deb.nodesource.com/setup_6.x | bash -;\n else\n curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} -E bash -;\n fi\n };\n\n ${SUDO} apt-get update;\n ${SUDO} apt-get install -y nodejs;\n }\n\n\n# Debian 8\n##########\nelif echo ${LINUX_TYPE} | grep -qi \"debian\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n {\n if test \"${SUDO}\" = \"\"; then\n curl -sL https://deb.nodesource.com/setup_6.x | bash -;\n else\n curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} -E bash -;\n fi\n };\n\n ${SUDO} apt-get update;\n ${SUDO} apt-get install -y nodejs;\n }\n\n# Fedora 23\n###########\nelif echo ${LINUX_TYPE} | grep -qi \"fedora\"; then\n command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" procps-ng\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} dnf -y install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;\n ${SUDO} dnf -y install nodejs;\n }\n\n\n# CentOS 7.1 & Oracle Linux 7.1\n###############################\nelif echo ${LINUX_TYPE} | grep -qi \"centos\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;\n ${SUDO} yum -y install nodejs;\n }\n\n# openSUSE 13.2\n###############\nelif echo ${LINUX_TYPE} | grep -qi \"opensuse\"; then\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} zypper install -y ${PACKAGES};\n }\n\n command -v nodejs >/dev/null 2>&1 || {\n ${SUDO} zypper ar http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1/ Node.js\n ${SUDO} zypper in nodejs\n }\n\nelse\n >&2 echo \"Unrecognized Linux Type\"\n >&2 cat $FILE\n exit 1\nfi\n\n\n########################\n### Install JS-TS LS ###\n########################\n\ncurl -s ${AGENT_BINARIES_URI} | tar xzf - -C ${LS_DIR}\n\ntouch ${LS_LAUNCHER}\nchmod +x ${LS_LAUNCHER}\necho \"nodejs ${LS_DIR}/build/language-server-stdio.js\" > ${LS_LAUNCHER}"
}

View File

@ -9,5 +9,5 @@
"port": "22/tcp"
}
},
"script" : "#\n# Copyright (c) 2012-2016 Codenvy, S.A.\n# All rights reserved. This program and the accompanying materials\n# are made available under the terms of the Eclipse Public License v1.0\n# which accompanies this distribution, and is available at\n# http://www.eclipse.org/legal/epl-v10.html\n#\n# Contributors:\n# Codenvy, S.A. - initial API and implementation\n#\n\nunset SUDO\nunset PACKAGES\ntest \"$(id -u)\" = 0 || SUDO=\"sudo\"\n\nif [ -f /etc/centos-release ]; then\n FILE=\"/etc/centos-release\"\n LINUX_TYPE=$(cat $FILE | awk '{print $1}')\n elif [ -f /etc/redhat-release ]; then\n FILE=\"/etc/redhat-release\"\n LINUX_TYPE=$(cat $FILE | cut -c 1-8)\n else\n FILE=\"/etc/os-release\"\n LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]')\n LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=)\nfi\n\n###############################\n### Install Needed packaged ###\n###############################\n\n# Red Hat Enterprise Linux 7 \n############################\nif echo ${LINUX_TYPE} | grep -qi \"rhel\"; then\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openssh-server\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd\n\n# Red Hat Enterprise Linux 6 \n############################\nelif echo ${LINUX_TYPE} | grep -qi \"Red Hat\"; then\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openssh-server\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd\n\n# Ubuntu 14.04 16.04 / Linux Mint 17 \n####################################\nelif echo ${LINUX_TYPE} | grep -qi \"ubuntu\"; then\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openssh-server\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd\n\n# Debian 8\n##########\nelif echo ${LINUX_TYPE} | grep -qi \"debian\"; then\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openssh-server\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd\n\n# Fedora 23\n###########\nelif echo ${LINUX_TYPE} | grep -qi \"fedora\"; then\n PACKAGES=${PACKAGES}\" procps-ng\"\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openssh-server\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} dnf -y install ${PACKAGES};\n }\n ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd\n\n# CentOS 7.1 & Oracle Linux 7.1\n###############################\nelif echo ${LINUX_TYPE} | grep -qi \"centos\"; then\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openssh-server\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd\n\n# openSUSE 13.2\n###############\nelif echo ${LINUX_TYPE} | grep -qi \"opensuse\"; then\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openSSH\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} zypper install -y ${PACKAGES};\n }\n ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd\n\n# Alpine 3.3\n############$$\nelif echo ${LINUX_TYPE} | grep -qi \"alpine\"; then\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openssh\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apk update;\n ${SUDO} apk add openssh ${PACKAGES};\n }\n\n# Centos 6.6, 6.7, 6.8\n############\nelif echo ${LINUX_TYPE} | grep -qi \"CentOS\"; then\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openssh-server\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd\n\nelse\n >&2 echo \"Unrecognized Linux Type\"\n >&2 cat $FILE\n exit 1\nfi\n\ncommand -v pidof >/dev/null 2>&1 && {\n pidof sshd >/dev/null 2>&1 && exit\n} || {\n ps -fC sshd >/dev/null 2>&1 && exit\n}\n\n\n${SUDO} mkdir -p /var/run/sshd\n\nif echo ${LINUX_TYPE} | grep -qi \"CentOS\"; then\n ${SUDO} /usr/bin/ssh-keygen -q -P '' -t rsa -f ~/.ssh/id_rsa\nelse\n ${SUDO} /usr/bin/ssh-keygen -A\nfi\n\n${SUDO} /usr/sbin/sshd -D\n"
"script" : "#\n# Copyright (c) 2012-2016 Codenvy, S.A.\n# All rights reserved. This program and the accompanying materials\n# are made available under the terms of the Eclipse Public License v1.0\n# which accompanies this distribution, and is available at\n# http://www.eclipse.org/legal/epl-v10.html\n#\n# Contributors:\n# Codenvy, S.A. - initial API and implementation\n#\n\nunset SUDO\nunset PACKAGES\ntest \"$(id -u)\" = 0 || SUDO=\"sudo\"\n\nif [ -f /etc/centos-release ]; then\n FILE=\"/etc/centos-release\"\n LINUX_TYPE=$(cat $FILE | awk '{print $1}')\n elif [ -f /etc/redhat-release ]; then\n FILE=\"/etc/redhat-release\"\n LINUX_TYPE=$(cat $FILE | cut -c 1-8)\n else\n FILE=\"/etc/os-release\"\n LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]')\n LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=)\nfi\n\n###############################\n### Install Needed packaged ###\n###############################\n\n# Red Hat Enterprise Linux 7 \n############################\nif echo ${LINUX_TYPE} | grep -qi \"rhel\"; then\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openssh-server\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd\n\n# Red Hat Enterprise Linux 6 \n############################\nelif echo ${LINUX_TYPE} | grep -qi \"Red Hat\"; then\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openssh-server\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd\n\n# Ubuntu 14.04 16.04 / Linux Mint 17 \n####################################\nelif echo ${LINUX_TYPE} | grep -qi \"ubuntu\"; then\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openssh-server\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd\n\n# Debian 8\n##########\nelif echo ${LINUX_TYPE} | grep -qi \"debian\"; then\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openssh-server\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd\n\n# Fedora 23\n###########\nelif echo ${LINUX_TYPE} | grep -qi \"fedora\"; then\n command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" procps-ng\"; }\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openssh-server\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} dnf -y install ${PACKAGES};\n }\n ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd\n\n# CentOS 7.1 & Oracle Linux 7.1\n###############################\nelif echo ${LINUX_TYPE} | grep -qi \"centos\"; then\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openssh-server\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd\n\n# openSUSE 13.2\n###############\nelif echo ${LINUX_TYPE} | grep -qi \"opensuse\"; then\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openSSH\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} zypper install -y ${PACKAGES};\n }\n ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd\n\n# Alpine 3.3\n############$$\nelif echo ${LINUX_TYPE} | grep -qi \"alpine\"; then\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openssh\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apk update;\n ${SUDO} apk add openssh ${PACKAGES};\n }\n\n# Centos 6.6, 6.7, 6.8\n############\nelif echo ${LINUX_TYPE} | grep -qi \"CentOS\"; then\n command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" openssh-server\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n ${SUDO} sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd\n\nelse\n >&2 echo \"Unrecognized Linux Type\"\n >&2 cat $FILE\n exit 1\nfi\n\ncommand -v pidof >/dev/null 2>&1 && {\n pidof sshd >/dev/null 2>&1 && exit\n} || {\n ps -fC sshd >/dev/null 2>&1 && exit\n}\n\n\n${SUDO} mkdir -p /var/run/sshd\n\nif echo ${LINUX_TYPE} | grep -qi \"CentOS\"; then\n ${SUDO} /usr/bin/ssh-keygen -q -P '' -t rsa -f ~/.ssh/id_rsa\nelse\n ${SUDO} /usr/bin/ssh-keygen -A\nfi\n\n${SUDO} /usr/sbin/sshd -D\n"
}

File diff suppressed because one or more lines are too long

View File

@ -4,5 +4,5 @@
"description": "Unison File Synchronizer",
"dependencies": [],
"properties": {},
"script" : "#\n# Copyright (c) 2012-2016 Codenvy, S.A.\n# All rights reserved. This program and the accompanying materials\n# are made available under the terms of the Eclipse Public License v1.0\n# which accompanies this distribution, and is available at\n# http://www.eclipse.org/legal/epl-v10.html\n#\n# Contributors:\n# Codenvy, S.A. - initial API and implementation\n#\n\nunset SUDO\nunset PACKAGES\ntest \"$(id -u)\" = 0 || SUDO=\"sudo\"\n\nif [ -f /etc/centos-release ]; then\n FILE=\"/etc/centos-release\"\n LINUX_TYPE=$(cat $FILE | awk '{print $1}')\n elif [ -f /etc/redhat-release ]; then\n FILE=\"/etc/redhat-release\"\n LINUX_TYPE=$(cat $FILE | cut -c 1-8)\n else\n FILE=\"/etc/os-release\"\n LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]')\n LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=)\nfi\n\n###############################\n### Install Needed packaged ###\n###############################\n\n# Red Hat Enterprise Linux 7 \n############################\nif echo ${LINUX_TYPE} | grep -qi \"rhel\"; then\n command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" unison\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n\n# Red Hat Enterprise Linux 6 \n############################\nelif echo ${LINUX_TYPE} | grep -qi \"Red Hat\"; then\n command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" unison\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n\n# Ubuntu 14.04 16.04 / Linux Mint 17 \n####################################\nelif echo ${LINUX_TYPE} | grep -qi \"ubuntu\"; then\n command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" unison\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n\n# Debian 8\n##########\nelif echo ${LINUX_TYPE} | grep -qi \"debian\"; then\n command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" unison\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n\n# Fedora 23\n###########\nelif echo ${LINUX_TYPE} | grep -qi \"fedora\"; then\n PACKAGES=${PACKAGES}\" procps-ng\"\n command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" unison\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} dnf -y install ${PACKAGES};\n }\n\n# CentOS 7.1 & Oracle Linux 7.1\n###############################\nelif echo ${LINUX_TYPE} | grep -qi \"centos\"; then\n command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" unison\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n\n# openSUSE 13.2\n###############\nelif echo ${LINUX_TYPE} | grep -qi \"opensuse\"; then\n command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" unison\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} zypper install -y ${PACKAGES};\n }\n\n# Alpine 3.3\n############$$\nelif echo ${LINUX_TYPE} | grep -qi \"alpine\"; then\n command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" unison\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apk update;\n ${SUDO} apk add ${PACKAGES};\n }\n\nelse\n >&2 echo \"Unrecognized Linux Type\"\n >&2 cat /etc/os-release\n exit 1\nfi"
"script" : "#\n# Copyright (c) 2012-2016 Codenvy, S.A.\n# All rights reserved. This program and the accompanying materials\n# are made available under the terms of the Eclipse Public License v1.0\n# which accompanies this distribution, and is available at\n# http://www.eclipse.org/legal/epl-v10.html\n#\n# Contributors:\n# Codenvy, S.A. - initial API and implementation\n#\n\nunset SUDO\nunset PACKAGES\ntest \"$(id -u)\" = 0 || SUDO=\"sudo\"\n\nif [ -f /etc/centos-release ]; then\n FILE=\"/etc/centos-release\"\n LINUX_TYPE=$(cat $FILE | awk '{print $1}')\n elif [ -f /etc/redhat-release ]; then\n FILE=\"/etc/redhat-release\"\n LINUX_TYPE=$(cat $FILE | cut -c 1-8)\n else\n FILE=\"/etc/os-release\"\n LINUX_TYPE=$(cat $FILE | grep ^ID= | tr '[:upper:]' '[:lower:]')\n LINUX_VERSION=$(cat $FILE | grep ^VERSION_ID=)\nfi\n\n###############################\n### Install Needed packaged ###\n###############################\n\n# Red Hat Enterprise Linux 7 \n############################\nif echo ${LINUX_TYPE} | grep -qi \"rhel\"; then\n command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" unison\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n\n# Red Hat Enterprise Linux 6 \n############################\nelif echo ${LINUX_TYPE} | grep -qi \"Red Hat\"; then\n command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" unison\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n\n# Ubuntu 14.04 16.04 / Linux Mint 17 \n####################################\nelif echo ${LINUX_TYPE} | grep -qi \"ubuntu\"; then\n command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" unison\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n\n# Debian 8\n##########\nelif echo ${LINUX_TYPE} | grep -qi \"debian\"; then\n command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" unison\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apt-get update;\n ${SUDO} apt-get -y install ${PACKAGES};\n }\n\n# Fedora 23\n###########\nelif echo ${LINUX_TYPE} | grep -qi \"fedora\"; then\n command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" procps-ng\"; }\n command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" unison\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} dnf -y install ${PACKAGES};\n }\n\n# CentOS 7.1 & Oracle Linux 7.1\n###############################\nelif echo ${LINUX_TYPE} | grep -qi \"centos\"; then\n command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" unison\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} yum -y install ${PACKAGES};\n }\n\n# openSUSE 13.2\n###############\nelif echo ${LINUX_TYPE} | grep -qi \"opensuse\"; then\n command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" unison\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} zypper install -y ${PACKAGES};\n }\n\n# Alpine 3.3\n############$$\nelif echo ${LINUX_TYPE} | grep -qi \"alpine\"; then\n command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}\" unison\"; }\n test \"${PACKAGES}\" = \"\" || {\n ${SUDO} apk update;\n ${SUDO} apk add ${PACKAGES};\n }\n\nelse\n >&2 echo \"Unrecognized Linux Type\"\n >&2 cat /etc/os-release\n exit 1\nfi"
}

File diff suppressed because one or more lines are too long

View File

@ -112,7 +112,7 @@ elif echo ${LINUX_TYPE} | grep -qi "debian"; then
# Fedora 23
###########
elif echo ${LINUX_TYPE} | grep -qi "fedora"; then
PACKAGES=${PACKAGES}" procps-ng"
command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; }
test "${PACKAGES}" = "" || {
${SUDO} dnf -y install ${PACKAGES};
}

View File

@ -75,7 +75,7 @@ elif echo ${LINUX_TYPE} | grep -qi "debian"; then
# Fedora 23
###########
elif echo ${LINUX_TYPE} | grep -qi "fedora"; then
PACKAGES=${PACKAGES}" procps-ng"
command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; }
test "${PACKAGES}" = "" || {
${SUDO} dnf -y install ${PACKAGES};
}

View File

@ -112,7 +112,7 @@ elif echo ${LINUX_TYPE} | grep -qi "debian"; then
# Fedora 23
###########
elif echo ${LINUX_TYPE} | grep -qi "fedora"; then
PACKAGES=${PACKAGES}" procps-ng"
command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; }
test "${PACKAGES}" = "" || {
${SUDO} dnf -y install ${PACKAGES};
}

View File

@ -70,7 +70,7 @@ elif echo ${LINUX_TYPE} | grep -qi "debian"; then
# Fedora 23
###########
elif echo ${LINUX_TYPE} | grep -qi "fedora"; then
PACKAGES=${PACKAGES}" procps-ng"
command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; }
command -v sshd >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" openssh-server"; }
test "${PACKAGES}" = "" || {
${SUDO} dnf -y install ${PACKAGES};

View File

@ -67,7 +67,7 @@ elif echo ${LINUX_TYPE} | grep -qi "debian"; then
# Fedora 23
###########
elif echo ${LINUX_TYPE} | grep -qi "fedora"; then
PACKAGES=${PACKAGES}" procps-ng"
command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; }
test "${PACKAGES}" = "" || {
${SUDO} dnf -y install ${PACKAGES};
}

View File

@ -66,7 +66,7 @@ elif echo ${LINUX_TYPE} | grep -qi "debian"; then
# Fedora 23
###########
elif echo ${LINUX_TYPE} | grep -qi "fedora"; then
PACKAGES=${PACKAGES}" procps-ng"
command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; }
command -v unison >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" unison"; }
test "${PACKAGES}" = "" || {
${SUDO} dnf -y install ${PACKAGES};

View File

@ -67,7 +67,7 @@ elif echo ${LINUX_TYPE} | grep -qi "debian"; then
# Fedora 23
###########
elif echo ${LINUX_TYPE} | grep -qi "fedora"; then
PACKAGES=${PACKAGES}" procps-ng"
command -v ps >/dev/null 2>&1 || { PACKAGES=${PACKAGES}" procps-ng"; }
test "${PACKAGES}" = "" || {
${SUDO} dnf -y install ${PACKAGES};
}