You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by ja...@apache.org on 2020/02/02 22:39:28 UTC

[lucene-site] branch master updated: Change build.sh script to use -l (live) instead of -s to avoid clash with pelican -s option.

This is an automated email from the ASF dual-hosted git repository.

janhoy pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/lucene-site.git


The following commit(s) were added to refs/heads/master by this push:
     new ae41da4  Change build.sh script to use -l (live) instead of -s to avoid clash with pelican -s option.
ae41da4 is described below

commit ae41da4e4a57c821afc2668937652e5f0b80943c
Author: Jan Høydahl <ja...@cominvent.com>
AuthorDate: Sun Feb 2 23:39:05 2020 +0100

    Change build.sh script to use -l (live) instead of -s to avoid clash with pelican -s option.
---
 README.md |  9 +++++----
 build.sh  | 15 +++++++++++----
 2 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/README.md b/README.md
index f84c807..428a3dc 100644
--- a/README.md
+++ b/README.md
@@ -10,9 +10,10 @@ If the staged site looks good, simply merge the changes to branch `production` a
 
 For larger edits it is recommended to build and preview the site locally. This is much faster. The next sections detail that procedure. The TL;DR instructions goes like this:
 
-    # Usage: ./build.sh [-s]
-    #       -s  Serve the site on localhost:8000 and auto reload on changes
-    ./build -s
+    # Usage: ./build.sh [-l] [<other pelican arguments>]
+    #        -l     Live build and reload source changes on localhost:8000
+    #        --help Show full help for options that Pelican accepts
+    ./build -l
 
 Now go to <http://localhost:8000> to view the beautiful Lucene web page served from your laptop with live-preview of updates :)
 
@@ -48,7 +49,7 @@ You can also tell Pelican to watch for your modifications, instead of manually r
 pelican --autoreload --listen
 ```
 
-Remember that on Mac/Linux you can use the `build.sh` script with `-s` option to do the same.
+Remember that on Mac/Linux you can use the `build.sh` script with `-l` option to do the same.
 
 ## Updating site during a Lucene/Solr release
 
diff --git a/build.sh b/build.sh
index ab2d64b..2d09cb3 100755
--- a/build.sh
+++ b/build.sh
@@ -15,14 +15,21 @@
 # limitations under the License.
 
 if [[ ! -z $1 ]]; then
-  if [[ "$1" == "-s" ]]; then
+  if [[ "$1" == "-l" ]]; then
     SERVE=true
     shift
   else
-    echo "Usage: ./build.sh [-s] [<other pelican arguments>]"
-    echo "       -s  Serve the site on localhost:8000 and auto reload on changes"
+    echo "Usage: ./build.sh [-l] [<other pelican arguments>]"
+    echo "       -l     Live build and reload source changes on localhost:8000"
+    echo "       --help Show full help for options that Pelican accepts"
     if [[ "$1" == "-h" ]]; then
       exit 0
+    elif [[ "$1" == "--help" ]]; then
+      echo
+      echo "Below is a list of other arguments you can use which will be passed to pelican."
+      echo
+      pelican --help
+      exit 0
     fi
   fi
 fi
@@ -52,6 +59,6 @@ if [[ $SERVE ]]; then
   pelican --autoreload --listen $@
 else
   echo "Building Lucene site."
-  echo "To build and serve live edits locally, run this script with -s option."
+  echo "To build and serve live edits locally, run this script with -l argument. Use -h for help."
   pelican $@
 fi
\ No newline at end of file