etherpad-lite/bin/deb-src/DEBIAN/preinst

27 lines
578 B
Plaintext
Raw Normal View History

#!/bin/bash
# Installs node if it isn't already installed
#
# Don't steamroll over a previously installed node version
# TODO provide a local version of node?
VER="0.10.4"
ARCH="x86"
if [ `arch | grep 64` ]
then
ARCH="x64"
fi
# TODO test version
if [ ! -f /usr/local/bin/node ]
then
pushd /tmp
wget -c "http://nodejs.org/dist/v${VER}/node-v${VER}-linux-${ARCH}.tar.gz"
rm -rf /tmp/node-v${VER}-linux-${ARCH}
tar xf node-v${VER}-linux-${ARCH}.tar.gz -C /tmp/
cp -a /tmp/node-v${VER}-linux-${ARCH}/* /usr/local/
fi
2013-11-24 03:52:55 +01:00
# Create Etherpad user
adduser --system etherpad