Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace Crane with felixfbecker PHP Language Server #2830

Merged
merged 1 commit into from
Oct 26, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"name": "org.eclipse.che.ls.php",
"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\nLINUX_TYPE=$(cat /etc/os-release | grep ^ID= | tr '[:upper:]' '[:lower:]')\nLINUX_VERSION=$(cat /etc/os-release | grep ^VERSION_ID=)\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\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 /etc/os-release\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-crane-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.php.binaries\nCHE_DIR=$HOME/che\nLS_DIR=${CHE_DIR}/ls-php\nLS_LAUNCHER=${LS_DIR}/launch.sh\n\nLINUX_TYPE=$(cat /etc/os-release | grep ^ID= | tr '[:upper:]' '[:lower:]')\nLINUX_VERSION=$(cat /etc/os-release | grep ^VERSION_ID=)\nMACHINE_TYPE=$(uname -m)\n\nmkdir -p ${CHE_DIR}\nmkdir -p ${LS_DIR}\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}"
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,117 +27,13 @@ MACHINE_TYPE=$(uname -m)
mkdir -p ${CHE_DIR}
mkdir -p ${LS_DIR}

########################
### Install packages ###
########################

# Red Hat Enterprise Linux 7
############################
if echo ${LINUX_TYPE} | grep -qi "rhel"; then
test "${PACKAGES}" = "" || {
${SUDO} yum install ${PACKAGES};
}

command -v nodejs >/dev/null 2>&1 || {
curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;
${SUDO} yum -y install nodejs;
}


# Ubuntu 14.04 16.04 / Linux Mint 17
####################################
elif echo ${LINUX_TYPE} | grep -qi "ubuntu"; then
test "${PACKAGES}" = "" || {
${SUDO} apt-get update;
${SUDO} apt-get -y install ${PACKAGES};
}

command -v nodejs >/dev/null 2>&1 || {
{
if test "${SUDO}" = ""; then
curl -sL https://deb.nodesource.com/setup_6.x | bash -;
else
curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} -E bash -;
fi
};

${SUDO} apt-get update;
${SUDO} apt-get install -y nodejs;
}


# Debian 8
##########
elif echo ${LINUX_TYPE} | grep -qi "debian"; then
test "${PACKAGES}" = "" || {
${SUDO} apt-get update;
${SUDO} apt-get -y install ${PACKAGES};
}

command -v nodejs >/dev/null 2>&1 || {
{
if test "${SUDO}" = ""; then
curl -sL https://deb.nodesource.com/setup_6.x | bash -;
else
curl -sL https://deb.nodesource.com/setup_6.x | ${SUDO} -E bash -;
fi
};

${SUDO} apt-get update;
${SUDO} apt-get install -y nodejs;
}

# Fedora 23
###########
elif echo ${LINUX_TYPE} | grep -qi "fedora"; then
PACKAGES=${PACKAGES}" procps-ng"
test "${PACKAGES}" = "" || {
${SUDO} dnf -y install ${PACKAGES};
}

command -v nodejs >/dev/null 2>&1 || {
curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;
${SUDO} dnf -y install nodejs;
}


# CentOS 7.1 & Oracle Linux 7.1
###############################
elif echo ${LINUX_TYPE} | grep -qi "centos"; then
test "${PACKAGES}" = "" || {
${SUDO} yum -y install ${PACKAGES};
}

command -v nodejs >/dev/null 2>&1 || {
curl --silent --location https://rpm.nodesource.com/setup_6.x | ${SUDO} bash -;
${SUDO} yum -y install nodejs;
}

# openSUSE 13.2
###############
elif echo ${LINUX_TYPE} | grep -qi "opensuse"; then
test "${PACKAGES}" = "" || {
${SUDO} zypper install -y ${PACKAGES};
}

command -v nodejs >/dev/null 2>&1 || {
${SUDO} zypper ar http://download.opensuse.org/repositories/devel:/languages:/nodejs/openSUSE_13.1/ Node.js
${SUDO} zypper in nodejs
}

else
>&2 echo "Unrecognized Linux Type"
>&2 cat /etc/os-release
exit 1
fi


#####################
### Install C# LS ###
#####################
######################
### Install PHP LS ###
######################

curl -s ${AGENT_BINARIES_URI} | tar xzf - -C ${LS_DIR}

touch ${LS_LAUNCHER}
chmod +x ${LS_LAUNCHER}
echo "nodejs ${LS_DIR}/vscode-crane-server/server.js" > ${LS_LAUNCHER}
echo "export LD_LIBRARY_PATH=${LS_DIR}/php7-minimal" > ${LS_LAUNCHER}
echo "${LS_DIR}/php7-minimal/php -c ${LS_DIR}/php7-minimal/php.ini ${LS_DIR}/php-language-server/bin/php-language-server.php" >> ${LS_LAUNCHER}