Skip to content

Commit 8af43a7

Browse files
committed
fix install script for Ubuntu 20.04
- `mkdir` shouldn't fail, so that `set -e` can be used to debug the script. - remove `sudo` as the script only accept UID 0 - update `nodejs` to v12
1 parent 8fd28e3 commit 8af43a7

File tree

3 files changed

+14
-13
lines changed

3 files changed

+14
-13
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This is a basic tool, intended to provide a reference example for implementors a
55

66
## Getting Started
77

8-
The following instructions have been tested on Ubuntu 16.04, but may work for other operating systems.
8+
The following instructions have been tested on Ubuntu 20.04, but may work for other operating systems.
99

1010
```
1111
$ git clone https://github.com/bbc/nmos-web-router.git

install.sh

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/bin/bash
2+
23
if [ "$EUID" -ne 0 ]
34
then echo "Please run as root"
45
exit
@@ -11,15 +12,15 @@ apt-get install -y curl git
1112
DIR=$(pwd)
1213

1314
# Add apt repositories for NodeJS and Yarn
14-
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
15-
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
16-
echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
15+
curl -sL https://deb.nodesource.com/setup_12.x | -E bash -
16+
curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add -
17+
echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list
1718

1819
# Install NodeJS and Yarn
1920
apt-get update && apt-get install -y nodejs yarn
2021

2122
# Create and cd into the directory required to run the provision_node script
22-
mkdir /home/vagrant
23+
mkdir -p /home/vagrant
2324
cd /home/vagrant
2425

2526
# Provision a Node
@@ -31,14 +32,14 @@ APT_TOOL='apt-get -o Debug::pkgProblemResolver=yes --no-install-recommends -y'
3132

3233
# All service are run as an ipstudio user
3334
useradd ipstudio
34-
mkdir /home/ipstudio
35+
mkdir -p /home/ipstudio
3536
chown -R ipstudio /home/ipstudio
3637

3738
sed -i 's/# deb-src/deb-src/' /etc/apt/sources.list
3839
apt-get update
39-
apt-get install python3-pip python3-mock devscripts debhelper equivs python3-setuptools python-stdeb python3 tox -y
40-
41-
cd /home/vagrant
40+
apt-get install python3-pip python3-mock devscripts debhelper equivs \
41+
dh-python python-setuptools python-all apache2-dev dh-systemd \
42+
python3-setuptools python-stdeb python3 tox -y
4243

4344
git clone https://github.com/bbc/nmos-common.git
4445
git clone https://github.com/bbc/nmos-reverse-proxy.git
@@ -55,23 +56,23 @@ make dsc
5556
mk-build-deps --install deb_dist/nmosreverseproxy_*.dsc --tool "$APT_TOOL"
5657
make deb
5758
dpkg -i dist/python3-nmosreverseproxy_*_all.deb
58-
sudo apt-get -f -y install
59+
apt-get -f -y install
5960

6061
cd /home/vagrant/nmos-mdns-bridge
6162
sed -i "s/, python3-nmoscommon//" stdeb.cfg
6263
make dsc
6364
mk-build-deps --install deb_dist/mdnsbridge_*.dsc --tool "$APT_TOOL"
6465
make deb
6566
dpkg -i dist/python3-mdnsbridge_*_all.deb
66-
sudo apt-get -f -y install
67+
apt-get -f -y install
6768

6869
cd /home/vagrant/nmos-node
6970
sed -i "s/, python3-nmoscommon//" stdeb.cfg
7071
make dsc
7172
mk-build-deps --install deb_dist/nodefacade_*.dsc --tool "$APT_TOOL"
7273
make deb
7374
dpkg -i dist/python3-nodefacade_*_all.deb
74-
sudo apt-get -f -y install
75+
apt-get -f -y install
7576

7677
service apache2 restart
7778

src/ips-nmos-api/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ Installation
1616
------------
1717

1818
```
19-
npm i -s bbc/ips-nmos-api
19+
npm i -s src/ips-nmos-api
2020
```
2121

2222
or

0 commit comments

Comments
 (0)