rebuild: update code style
This commit is contained in:
parent
4811fcc29e
commit
428303c9fb
69
rebuild.sh
69
rebuild.sh
@ -9,44 +9,45 @@ numcpus() {
|
||||
}
|
||||
|
||||
buildsite() {
|
||||
local site="$1"
|
||||
|
||||
echo "Site: ${1}"
|
||||
echo "Site: ${site}"
|
||||
(
|
||||
cd "$site"
|
||||
|
||||
pushd "$1" >/dev/null
|
||||
echo "Cleaning wwwroot directory..."
|
||||
|
||||
echo "Cleaning wwwroot directory..."
|
||||
|
||||
if [[ -d wwwroot ]] ; then
|
||||
rm -r wwwroot
|
||||
fi
|
||||
mkdir -p wwwroot/{img,srv,static}
|
||||
|
||||
echo "Copying static resources..."
|
||||
|
||||
if [[ ! -d static ]] ; then
|
||||
mkdir static
|
||||
fi
|
||||
cp "${APP_DIR}/static/"* wwwroot/static || true
|
||||
cp static/* wwwroot/static || true
|
||||
|
||||
for htm in footer header homepage_blurb ; do
|
||||
if [[ ! -f "${htm}.htm" ]] ; then
|
||||
touch "${htm}.htm"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Building pages..."
|
||||
|
||||
local threadcount=$(numcpus)
|
||||
for i in $(seq 0 "$threadcount") ; do
|
||||
"${APP_DIR}/lib/bootstrap.php" "$threadcount" "$i" &
|
||||
done
|
||||
wait
|
||||
|
||||
echo "Site: ${1} finished."
|
||||
echo ""
|
||||
if [[ -d wwwroot ]] ; then
|
||||
rm -r wwwroot
|
||||
fi
|
||||
mkdir -p wwwroot/{img,srv,static}
|
||||
|
||||
popd >/dev/null
|
||||
echo "Copying static resources..."
|
||||
|
||||
if [[ ! -d static ]] ; then
|
||||
mkdir static
|
||||
fi
|
||||
cp "${APP_DIR}/static/"* wwwroot/static || true
|
||||
cp static/* wwwroot/static || true
|
||||
|
||||
for htm in footer header homepage_blurb ; do
|
||||
if [[ ! -f "${htm}.htm" ]] ; then
|
||||
touch "${htm}.htm"
|
||||
fi
|
||||
done
|
||||
|
||||
echo "Building pages..."
|
||||
|
||||
local threadcount=$(numcpus)
|
||||
for i in $(seq 0 "$threadcount") ; do
|
||||
"${APP_DIR}/lib/bootstrap.php" "$threadcount" "$i" &
|
||||
done
|
||||
wait
|
||||
|
||||
echo "Site: ${site} finished."
|
||||
echo ""
|
||||
)
|
||||
|
||||
}
|
||||
|
||||
usage() {
|
||||
|
Reference in New Issue
Block a user