Files
spark/doc/user/build.sh
T

26 lines
448 B
Bash

#!/bin/bash
tmpfile=$(mktemp /tmp/quiet_build_log.XXXX)
cur_dir=$(pwd)
temp_path="$2/web_temp"
zola_path=$(readlink -f "../../externals/linux/bin/zola/zola")
mkdir -p $temp_path
cp -r ./* $temp_path
cp -r ../../src/sdk/doc/* $temp_path/content/bts_spark_sdk/Server/
cd $temp_path
$zola_path build -u '/docs/' -o $1 >$tmpfile 2>&1
cd $cur_dir
rm -r $temp_path
if [ $? -eq 0 ]
then
rm $tmpfile
exit 0
else
cat $tmpfile
exit 1
fi