dnote/web/scripts/setup.sh
2019-05-10 09:31:31 +10:00

17 lines
458 B
Bash
Executable file

#!/bin/bash
# setup.sh prepares the directory structure and copies static files
set -eux -o pipefail
basePath="$GOPATH/src/github.com/dnote/dnote"
appStaticDir=$PUBLIC_PATH
compiledPath=$COMPILED_PATH
# prepare directories
rm -rf "$compiledPath"
rm -rf "$appStaticDir"
mkdir -p "$compiledPath"
mkdir -p "$appStaticDir/dist"
# copy the assets and artifacts
cp -r "$basePath"/web/static/* "$appStaticDir/dist"
cp "$basePath/web/index.html" "$appStaticDir"