2017-11-12 01:42:55 +00:00
|
|
|
#!/bin/sh
|
|
|
|
|
2017-11-20 18:13:26 +00:00
|
|
|
set -e
|
|
|
|
|
2018-03-04 14:15:26 +01:00
|
|
|
CLEANSLATE="node_modules/cleanslate/docs/files/cleanslate.css"
|
2017-11-12 01:42:55 +00:00
|
|
|
|
2018-05-14 14:19:20 +10:00
|
|
|
isWindowsMingw() {
|
|
|
|
local is_mingw="False"
|
|
|
|
if [ "$(uname | cut -c 1-5)" == "MINGW" ]; then
|
|
|
|
is_mingw="True"
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo -n "${is_mingw}"
|
|
|
|
}
|
|
|
|
|
|
|
|
if [ "$(isWindowsMingw)" == "True" ]; then
|
|
|
|
NPM_BIN_DIR="$(cygpath $(npm bin))"
|
|
|
|
PATH=$NPM_BIN_DIR:$PATH
|
|
|
|
else
|
|
|
|
PATH="$(npm bin):$PATH"
|
|
|
|
fi
|
|
|
|
|
|
|
|
export PATH
|
|
|
|
|
|
|
|
mkdir -p build
|
|
|
|
mkdir -p build/static
|
2017-11-12 01:42:55 +00:00
|
|
|
mkdir -p generated/static
|
2018-04-13 23:30:53 +01:00
|
|
|
mkdir -p generated/static/clippy
|
2018-05-14 14:19:20 +10:00
|
|
|
|
2017-11-12 01:42:55 +00:00
|
|
|
scripts/excmds_macros.py
|
|
|
|
scripts/newtab.md.sh
|
2018-04-13 23:30:53 +01:00
|
|
|
scripts/make_tutorial.sh
|
2017-11-12 01:42:55 +00:00
|
|
|
scripts/make_docs.sh &
|
|
|
|
|
2018-05-14 14:19:20 +10:00
|
|
|
nearleyc src/grammars/bracketexpr.ne \
|
|
|
|
> src/grammars/.bracketexpr.generated.ts
|
|
|
|
|
|
|
|
if [ "$(isWindowsMingw)" == "True" ]; then
|
|
|
|
powershell native/win_install.ps1
|
|
|
|
else
|
|
|
|
native/install.sh local
|
|
|
|
fi
|
|
|
|
|
|
|
|
(webpack --display errors-only \
|
|
|
|
&& scripts/git_version.sh) &
|
2017-11-12 01:42:55 +00:00
|
|
|
|
|
|
|
wait
|
2018-03-04 14:42:35 +01:00
|
|
|
|
|
|
|
if [ -e "$CLEANSLATE" ] ; then
|
2018-05-14 14:19:20 +10:00
|
|
|
cp -v "$CLEANSLATE" build/static/cleanslate.css
|
2018-03-04 14:42:35 +01:00
|
|
|
else
|
|
|
|
echo "Couldn't find cleanslate.css. Try running 'npm install'"
|
|
|
|
fi
|