2016-10-11 08:58:23 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
# When you change this file, you must take manual action. Read this doc:
|
|
|
|
# - https://docs.sandstorm.io/en/latest/vagrant-spk/customizing/#setupsh
|
|
|
|
|
|
|
|
set -euo pipefail
|
|
|
|
|
2020-04-22 21:37:19 +00:00
|
|
|
export HUGO_VERSION=$(cat /opt/app/hugo-version)
|
|
|
|
export NODE_VERSION=$(cat /opt/app/.nvmrc)
|
2020-04-10 11:29:40 +00:00
|
|
|
|
2016-10-11 08:58:23 +00:00
|
|
|
apt-get update
|
2020-04-10 14:08:44 +00:00
|
|
|
apt-get install -y git
|
2020-05-06 21:15:08 +00:00
|
|
|
apt-get install -y g++ autoconf pkg-config libtool
|
2016-10-11 08:58:23 +00:00
|
|
|
# First, get capnproto from master and install it to
|
2020-05-06 21:15:08 +00:00
|
|
|
# /usr/local/bin. This requires a C++ compiler. clang wasn't working
|
|
|
|
# well with building getPublicId so I switched to g++.
|
2016-10-11 08:58:23 +00:00
|
|
|
if [ ! -e /usr/local/bin/capnp ] ; then
|
|
|
|
cd /tmp
|
2020-04-10 11:29:40 +00:00
|
|
|
if [ ! -e capnproto ]; then git clone https://github.com/capnproto/capnproto; fi
|
2016-10-11 08:58:23 +00:00
|
|
|
cd capnproto
|
2020-04-10 11:29:40 +00:00
|
|
|
git checkout master
|
2016-10-11 08:58:23 +00:00
|
|
|
cd c++
|
|
|
|
autoreconf -i
|
|
|
|
./configure
|
|
|
|
make -j2
|
|
|
|
sudo make install
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Second, compile the small C++ program within
|
|
|
|
# /opt/app/sandstorm-integration.
|
|
|
|
if [ ! -e /opt/app/sandstorm-integration/getPublicId ] ; then
|
|
|
|
pushd /opt/app/sandstorm-integration
|
|
|
|
make
|
|
|
|
fi
|
|
|
|
|
|
|
|
cp /opt/app/sandstorm-integration/bin/getPublicId /usr/local/bin
|
|
|
|
|
2020-04-10 11:29:40 +00:00
|
|
|
curl -sL https://deb.nodesource.com/setup_${NODE_VERSION}.x | sudo -E bash -
|
2016-10-11 08:58:23 +00:00
|
|
|
apt-get install -y nodejs
|
2017-01-11 19:12:43 +00:00
|
|
|
npm install -g yarn
|
2016-10-11 08:58:23 +00:00
|
|
|
|
2017-01-11 21:03:45 +00:00
|
|
|
apt-get install -y python-pip asciidoctor
|
2017-01-11 19:10:39 +00:00
|
|
|
pip install pygments
|
|
|
|
|
2016-10-11 08:58:23 +00:00
|
|
|
cd /tmp
|
2022-10-04 11:13:41 +00:00
|
|
|
wget https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb -O hugo.deb
|
2016-10-11 08:58:23 +00:00
|
|
|
dpkg -i hugo.deb
|
|
|
|
rm hugo.deb
|