2018-04-18 15:27:28 +00:00
|
|
|
#!/bin/sh
|
2018-04-19 06:16:01 +00:00
|
|
|
|
2018-01-22 08:35:39 +00:00
|
|
|
set -e
|
|
|
|
|
2018-04-18 15:27:28 +00:00
|
|
|
cd $(dirname $0)
|
|
|
|
|
|
|
|
# Clean the dist folder and build the assets
|
|
|
|
if [ ! -d "frontend" ]; then
|
|
|
|
git clone -b master https://github.com/filebrowser/frontend
|
|
|
|
fi;
|
|
|
|
cd frontend
|
|
|
|
if [ -d "dist" ]; then
|
|
|
|
rm -rf dist/*
|
|
|
|
fi;
|
|
|
|
yarn install
|
|
|
|
yarn build
|
|
|
|
|
|
|
|
cd ..
|
|
|
|
|
2018-04-19 06:16:01 +00:00
|
|
|
dep ensure -vendor-only
|
|
|
|
|
2018-01-22 08:35:39 +00:00
|
|
|
# Install rice tool if not present
|
|
|
|
if ! [ -x "$(command -v rice)" ]; then
|
|
|
|
go get github.com/GeertJohan/go.rice/rice
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Embed the assets using rice
|
|
|
|
rice embed-go
|