mirror of
https://github.com/seigler/dash-docs
synced 2025-07-27 09:46:12 +00:00
Merge branch 'endlessloop'
This commit is contained in:
commit
d2d97ba8ba
2 changed files with 16 additions and 4 deletions
|
@ -49,14 +49,19 @@ lasttime=`stat -c %Y "$SITEDIR/_buildlock" | cut -d ' ' -f1`
|
||||||
# Build website in a child process
|
# Build website in a child process
|
||||||
(
|
(
|
||||||
cd $WORKDIR
|
cd $WORKDIR
|
||||||
JEKYLL_COMMAND='jekyll' make build
|
make valid && touch "$WORKDIR/_builddone" || touch "$WORKDIR/_buildfail"
|
||||||
touch "$WORKDIR/_builddone"
|
|
||||||
)&
|
)&
|
||||||
|
|
||||||
# Loop every 1 second to check status
|
# Loop every 1 second to check status
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
|
|
||||||
|
# Exit if site has been failed to build
|
||||||
|
if [ -e "$WORKDIR/_buildfail" ]; then
|
||||||
|
echo "Build failed"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
# Update site and exit if site has been successfully built
|
# Update site and exit if site has been successfully built
|
||||||
if [ -e "$WORKDIR/_builddone" ]; then
|
if [ -e "$WORKDIR/_builddone" ]; then
|
||||||
rsync --delete -zrt $WORKDIR/_site/ $DESTDIR/
|
rsync --delete -zrt $WORKDIR/_site/ $DESTDIR/
|
||||||
|
@ -69,6 +74,7 @@ do
|
||||||
time=`stat -c %Y "$SITEDIR/_buildlock" | cut -d ' ' -f1`
|
time=`stat -c %Y "$SITEDIR/_buildlock" | cut -d ' ' -f1`
|
||||||
fi
|
fi
|
||||||
if [ $time != $lasttime ]; then
|
if [ $time != $lasttime ]; then
|
||||||
|
echo "Build cancelled"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
|
@ -91,14 +91,19 @@ done
|
||||||
# Build website in a child process
|
# Build website in a child process
|
||||||
(
|
(
|
||||||
cd $WORKDIR
|
cd $WORKDIR
|
||||||
ENABLED_PLUGINS='alerts redirects releases' JEKYLL_COMMAND='jekyll' make
|
ENABLED_PLUGINS='alerts redirects releases' make build && touch "$WORKDIR/_builddone" || touch "$WORKDIR/_buildfail"
|
||||||
touch "$WORKDIR/_builddone"
|
|
||||||
)&
|
)&
|
||||||
|
|
||||||
# Loop every 1 second to check status
|
# Loop every 1 second to check status
|
||||||
while true
|
while true
|
||||||
do
|
do
|
||||||
|
|
||||||
|
# Exit if site has been failed to build
|
||||||
|
if [ -e "$WORKDIR/_buildfail" ]; then
|
||||||
|
echo "Build failed"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
# Update site and exit if site has been successfully built
|
# Update site and exit if site has been successfully built
|
||||||
if [ -e "$WORKDIR/_builddone" ]; then
|
if [ -e "$WORKDIR/_builddone" ]; then
|
||||||
cd $LIVEDIR
|
cd $LIVEDIR
|
||||||
|
@ -112,6 +117,7 @@ do
|
||||||
time=`stat -c %Y "$SITEDIR/site/_buildlock" | cut -d ' ' -f1`
|
time=`stat -c %Y "$SITEDIR/site/_buildlock" | cut -d ' ' -f1`
|
||||||
fi
|
fi
|
||||||
if [ $time != $lasttime ]; then
|
if [ $time != $lasttime ]; then
|
||||||
|
echo "Build cancelled"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue