mirror of
https://github.com/dnote/dnote
synced 2026-03-15 23:15:50 +01:00
24 lines
394 B
Bash
Executable file
24 lines
394 B
Bash
Executable file
#!/usr/bin/env bash
|
|
# build.sh builds styles
|
|
set -ex
|
|
|
|
dir=$(dirname "${BASH_SOURCE[0]}")
|
|
basePath="$dir/../../.."
|
|
serverDir="$dir/../.."
|
|
outputDir="$serverDir/static"
|
|
inputDir="$dir/src"
|
|
|
|
task="cp $inputDir/main.js $outputDir"
|
|
|
|
|
|
if [[ "$1" == "true" ]]; then
|
|
(
|
|
cd "$basePath/watcher" && \
|
|
go run main.go \
|
|
--task="$task" \
|
|
--context="$inputDir" \
|
|
"$inputDir"
|
|
)
|
|
else
|
|
eval "$task"
|
|
fi
|