[theslinux-phantom] theslinux-home branch core updated 3bb0d95 README: + new notes about the diff. between 2 branches

  • From: git@xxxxxxxxxxxxxxxxxxxx
  • To: theslinux-phantom@xxxxxxxxxxxxx
  • Date: Sun, 28 Jul 2013 08:53:42 -0700

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "theslinux-home".

The branch, core has been updated
       via  3bb0d951a00a5d1bed998e08e8cc2cf4a39d4cca (commit)
       via  e803bdcf000cbb384aeb1c3158a6c5fad4e2f61c (commit)
      from  b1655357027723796ab05c558105bbe201a31dd8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 3bb0d951a00a5d1bed998e08e8cc2cf4a39d4cca
Author: Ky-Anh Huynh <kyanh@xxxxxxxxxxxxx>
Date:   Sun Jul 28 22:29:12 2013 +0700

    README: + new notes about the diff. between 2 branches
    
    The two branches :core and :master are now very different. I do not
    now why this happens. But this is very true. We now do not want to
    develop :core features on :master, nor to develop :users stuff on
    the :core -- that should be used for Ruby scripts

commit e803bdcf000cbb384aeb1c3158a6c5fad4e2f61c
Author: Ky-Anh Huynh <kyanh@xxxxxxxxxxxxx>
Date:   Sun Jul 28 22:33:32 2013 +0700

    cherry-pick 5024b24348f90220747e3e04c0d1fdf495a38d9c

-----------------------------------------------------------------------

Summary of changes:
 README.md                              |  8 ++++
 bin/example-start-local-nanoc-stuff.sh | 72 +++++++++++++++++++++++++++++-----
 2 files changed, 71 insertions(+), 9 deletions(-)

diff --git a/README.md b/README.md
index df354fa..093f3b8 100644
--- a/README.md
+++ b/README.md
@@ -38,6 +38,11 @@ should not be updated by non-privileged developers. Because 
there are
 some mergences that causes very bad and messy logs, please consider to
 use `cherry-pick` if you want to use any `core` feature on your branch.
 
+*Important notes*: Since 2013 July 28th, the two branches are divergent
+and you can't merge them. The only way to get `core` feature is to use
+`cherry-pick`. However, you should not do that unless you really mean
+what you are going to do.
+
 ## Requirements
 
 The following `Ruby` gems are required to build source files with `nanoc`
@@ -62,3 +67,6 @@ any change `guard` will invoke `nanoc compile` to build your 
source.
 Please take a look at the example in
 
     ./bin/example-start-local-nanoc-stuff.sh
+
+This command normally generates so many output from `Guard` and `nanoc`.
+You may skip all or most of them by using some known redirections.
diff --git a/bin/example-start-local-nanoc-stuff.sh 
b/bin/example-start-local-nanoc-stuff.sh
index 69e6216..567d54d 100755
--- a/bin/example-start-local-nanoc-stuff.sh
+++ b/bin/example-start-local-nanoc-stuff.sh
@@ -1,14 +1,68 @@
 #!/usr/bin/bash
-
-# Purpose: Start Guard, nanoc view for local development
+#
 # Author : Anh K. Huynh
 # License: Fair license
-# Date   : 2013 July 3rd
-# Note   : This is only an example script. Use at your own risk
+# Date   : 2013 July {3rd, 28th}
+# Purpose: Start Guard, nanoc view for local development
+#
+# * Start `guard` to watch the source tree. If there is any
+#   update on any files, `guard` will execute `nanoc watch`
+#   to compile the source. All standard errors will be ignored,
+#   so you may need to tune this script.
+#
+# * Start `nanoc view` to create local server http://localhost:3000/.
+#   Because `nanoc view` doesn't support indexing, you need to use
+#   an absolute URI if there isn't index file in the source. For example,
+#   to view the compiled HTML version of the document
+#       contents/my/article.html
+#   you need to type on your browser's addressbar
+#       http://localhost:3000/my/article/
+#   (In production environment, accessing to http://theslinux/my/ lists
+#   the page `/article/` in the `index` page.)
+#
+# Notes:
+#
+# * This script is only an example script. Use at your own risk
+# * If you run this script multiple time you may launch many instances
+#   of `guard` program. To avoid that, you may install `rolo` gem
+#   which is detected automatically and used in this script
+#
+
+[[ -f "Guardfile" ]] \
+|| {
+  echo >&2 ":: Error: No Guardfile found"
+  echo >&2 ":: You should start from a directory that has a 'Guardfile'"
+  exit 1
+}
+
+[[ ! -f /etc/profile.d/rvm.sh ]] \
+|| source /etc/profile.d/rvm.sh
+
+{ ruby -v | grep -qE '(2\.0)|(1\.9)' ; } \
+|| rvm use ruby-2.0 \
+|| rvm use ruby-1.9 \
+|| {
+  echo >&2 ":: Unable to find Ruby (1.9|2.0) environment"
+  exit 1
+}
 
-[[ -f "Guardfile" ]] || { echo >&2 ":: Error: No Guardfile found"; exit 1; }
-rvm use ruby-2.0
-{ ruby -v | grep -q 2.0 ; } || { echo >&2 ":: Error: Not Ruby-2 found"; exit 
1; }
+which rolo >/dev/null 2>&1 \
+|| {
+  echo 2>&1 ":: Warning: Optional gem 'rolo' (>= 1.1.1) not found"
+  echo 2>&1 ":: Install 'rolo' gem to prevent 'guard' from running twice"
+}
 
-nohup guard start --no-interactions >/dev/null 2>&1 &
-nohup nanoc view >/dev/null 2>&1 &
+which guard >/dev/null \
+&& which nanoc >/dev/null \
+&& {
+  rolo=" "
+  which rolo >/dev/null 2>&1 && rolo="rolo --no-bind -a 127.0.0.1 -p 3000"
+  echo ":: Starting Guard (on background) to watch files"
+  $rolo guard start --no-interactions &
+  echo ":: Starting Nanoc (on background) to view files at 
http://localhost:3000/";
+  $rolo nanoc view &
+} \
+|| {
+  echo >&2 ":: Error: 'guard'/'nanoc' not found. Please install these gems"
+  exit 127
+}


hooks/post-receive
-- 
theslinux-home
--
Purpose: Store commits, feeds from other projects
Post: mailto:theslinux-phantom@xxxxxxxxxxxxx
Archive, Gmane: http://theslinux.org/lists/phantom/
Subscribe: mailto:theslinux-phantom-request@xxxxxxxxxxxxx?Subject=subscribe
Unsubscribe: mailto:theslinux-phantom-request@xxxxxxxxxxxxx?Subject=unsubscribe
Other information: http://theslinux.org/lists (vi) or 
http://theslinux.org/lists/en (en)
Support: mailto:theslinux-questions@xxxxxxxxxxxxx

Other related posts:

  • » [theslinux-phantom] theslinux-home branch core updated 3bb0d95 README: + new notes about the diff. between 2 branches - git