forked from siemens/codeface
-
Notifications
You must be signed in to change notification settings - Fork 6
/
shiny-server-pack.sh
36 lines (30 loc) · 1.26 KB
/
shiny-server-pack.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#! /bin/bash
# Copyright Siemens AG 2013
#
# Copying and distribution of this file, with or without modification,
# are permitted in any medium without royalty provided the copyright
# notice and this notice are preserved. This file is offered as-is,
# without any warranty.
# This script sets up a self-contained version of the shiny server,
# downloading a dedicated version of the latest node.js and then
# installing the modified shiny-server from
# https://github.com/JohannesEbke/shiny-server/tree/no-su
# with all dependencies in the node.js directory.
# It also creates a shiny-server-pack.tar.gz for distribution.
# This script must be run on a server where HTTP and HTTPS connections
# to the internet are possible. For installation on other systems,
# copy the shiny-server-pack.tar.gz and untar it in the codeface project
# directory.
export ARCH=x64
export NODEVER=0.10.13
export NODEVERSION=node-v${NODEVER}-linux-$ARCH
# --------
set -e
set -u
if [[ ! -e $NODEVERSION.tar.gz ]]; then
wget http://nodejs.org/dist/v$NODEVER/${NODEVERSION}.tar.gz
fi
#rm -rf $NODEVERSION
tar xzf ${NODEVERSION}.tar.gz
$NODEVERSION/bin/npm install -g https://github.com/JohannesEbke/shiny-server/archive/no-su.tar.gz
tar czf shiny-server-pack.tar.gz $NODEVERSION shiny-server-pack.sh