Skip to content
Snippets Groups Projects
build_molstar.sh 468 B
Newer Older
#! /bin/sh

function fail() {
	echo "ERROR: $1"
	exit 1
}

function cpy_css() {
	cp "build/watna-viewer/$1.css" ../ || fail "Cannot copy $1.css"
}

cd molstar || fail "Cannot cd into molstar directory"
npm install molstar || fail "Cannot install modules required to build Molstar"
Michal Malý's avatar
Michal Malý committed
npm run rebuild || fail "Failed to build Molstar"

cp build/watlas/molstar.js ../ || fail "Cannot copy molstar.js"
cpy_css "molstar"
cpy_css "watlas-viewer-common"
cpy_css "watna-viewer"