ignite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sboi...@apache.org
Subject [2/2] incubator-ignite git commit: # gg-9869: read cmd args
Date Thu, 05 Mar 2015 17:16:30 GMT
# gg-9869: read cmd args


Project: http://git-wip-us.apache.org/repos/asf/incubator-ignite/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-ignite/commit/237c50a3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-ignite/tree/237c50a3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-ignite/diff/237c50a3

Branch: refs/heads/gg-9869
Commit: 237c50a3981481f5512fdf666815172b206f34e1
Parents: 54c0ccc
Author: Artem Shutak <ashutak@gridgain.com>
Authored: Thu Mar 5 20:16:27 2015 +0300
Committer: Artem Shutak <ashutak@gridgain.com>
Committed: Thu Mar 5 20:16:27 2015 +0300

----------------------------------------------------------------------
 scripts/git-apply-patch.sh     | 28 ++++++++++++++++------------
 scripts/git-format-patch.sh    | 34 +++++++++++++++++++---------------
 scripts/git-patch-functions.sh |  2 +-
 scripts/git-patch-prop.sh      |  9 ++++++---
 4 files changed, 42 insertions(+), 31 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/237c50a3/scripts/git-apply-patch.sh
----------------------------------------------------------------------
diff --git a/scripts/git-apply-patch.sh b/scripts/git-apply-patch.sh
index 1ea41e2..f2299b0 100644
--- a/scripts/git-apply-patch.sh
+++ b/scripts/git-apply-patch.sh
@@ -20,17 +20,6 @@
 # Git patch-file applyer.
 #
 
-if [ -z ${IGNITE_HOME} ] # Script can be called from not IGNITE_HOME if IGNITE_HOME was set.
-    then IGNITE_HOME=$PWD
-fi
-
-. ${IGNITE_HOME}/scripts/git-patch-prop.sh # Import properties.
-. ${IGNITE_HOME}/scripts/git-patch-functions.sh # Import patch functions.
-
-if [ -f ${IGNITE_HOME}/scripts/git-patch-prop-local.sh ] # Whether a local user properties
file exists.
-    then . ${IGNITE_HOME}/scripts/git-patch-prop-local.sh # Import user properties (it will
rewrite global properties).
-fi
-
 #
 # Ignite task.
 #
@@ -44,6 +33,10 @@ do
     key="$1"
 
     case $key in
+        -ih|--ignitehome)
+        IGNITE_HOME="$2"
+        shift
+        ;;
         -idb|--ignitedefbranch)
         IGNITE_DEFAULT_BRANCH="$2"
         shift
@@ -59,7 +52,18 @@ do
     shift
 done
 
-echo 'Usage: scripts/git-format-patch.sh <ignite-task> [-idb|--ignitedefbranch <branch-name>]
[-ph|--patchhome <path>]'
+if [ -z ${IGNITE_HOME} ] # Script can be called from not IGNITE_HOME if IGNITE_HOME was set.
+    then IGNITE_HOME=$PWD
+fi
+
+. ${IGNITE_HOME}/scripts/git-patch-prop.sh # Import properties.
+. ${IGNITE_HOME}/scripts/git-patch-functions.sh # Import patch functions.
+
+if [ -f ${IGNITE_HOME}/scripts/git-patch-prop-local.sh ] # Whether a local user properties
file exists.
+    then . ${IGNITE_HOME}/scripts/git-patch-prop-local.sh # Import user properties (it will
rewrite global properties).
+fi
+
+echo 'Usage: scripts/git-apply-patch.sh <ignite-task> [-ih|--ignitehome <path>]
[-idb|--ignitedefbranch <branch-name>] [-ph|--patchhome <path>]'
 echo "It should be called from IGNITE_HOME directory."
 echo "Patch will be applied to DEFAULT_BRANCH from PATCHES_HOME."
 echo "Note: you can use ${IGNITE_HOME}/scripts/git-patch-prop-local.sh to set your own local
properties (to rewrite settings at git-patch-prop-local.sh). "

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/237c50a3/scripts/git-format-patch.sh
----------------------------------------------------------------------
diff --git a/scripts/git-format-patch.sh b/scripts/git-format-patch.sh
index 8817c75..5a01003 100644
--- a/scripts/git-format-patch.sh
+++ b/scripts/git-format-patch.sh
@@ -21,20 +21,6 @@
 #
 
 #
-# Init home and import properties and functions.
-#
-if [ -z ${IGNITE_HOME} ] # Script can be called from not IGNITE_HOME if IGNITE_HOME was set.
-    then IGNITE_HOME=$PWD
-fi
-
-. ${IGNITE_HOME}/scripts/git-patch-prop.sh # Import properties.
-. ${IGNITE_HOME}/scripts/git-patch-functions.sh # Import patch functions.
-
-if [ -f ${IGNITE_HOME}/scripts/git-patch-prop-local.sh ] # Whether a local user properties
file exists.
-    then . ${IGNITE_HOME}/scripts/git-patch-prop-local.sh # Import user properties (it will
rewrite global properties).
-fi
-
-#
 # Read command line params.
 #
 while [[ $# > 1 ]]
@@ -42,6 +28,10 @@ do
     key="$1"
 
     case $key in
+        -ih|--ignitehome)
+        IGNITE_HOME="$2"
+        shift
+        ;;
         -idb|--ignitedefbranch)
         IGNITE_DEFAULT_BRANCH="$2"
         shift
@@ -57,9 +47,23 @@ do
     shift
 done
 
+#
+# Init home and import properties and functions.
+#
+if [ -z ${IGNITE_HOME} ] # Script can be called from not IGNITE_HOME if IGNITE_HOME was set.
+    then IGNITE_HOME=$PWD
+fi
+
+. ${IGNITE_HOME}/scripts/git-patch-prop.sh # Import properties.
+. ${IGNITE_HOME}/scripts/git-patch-functions.sh # Import patch functions.
+
+if [ -f ${IGNITE_HOME}/scripts/git-patch-prop-local.sh ] # Whether a local user properties
file exists.
+    then . ${IGNITE_HOME}/scripts/git-patch-prop-local.sh # Import user properties (it will
rewrite global properties).
+fi
+
 IGNITE_CURRENT_BRANCH=$( determineCurrentBranch ${IGNITE_HOME} )
 
-echo 'Usage: scripts/git-format-patch.sh [-idb|--ignitedefbranch <branch-name>] [-ph|--patchhome
<path>]'
+echo 'Usage: scripts/git-format-patch.sh [-ih|--ignitehome <path>] [-idb|--ignitedefbranch
<branch-name>] [-ph|--patchhome <path>]'
 echo "It should be called from IGNITE_HOME directory."
 echo "Patch will be created at PATCHES_HOME between Master branch (IGNITE_DEFAULT_BRANCH)
and Current branch."
 echo "Note: you can use ${IGNITE_HOME}/scripts/git-patch-prop-local.sh to set your own local
properties (to rewrite settings at git-patch-prop-local.sh). "

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/237c50a3/scripts/git-patch-functions.sh
----------------------------------------------------------------------
diff --git a/scripts/git-patch-functions.sh b/scripts/git-patch-functions.sh
index 92aa6ca..115fd4c 100644
--- a/scripts/git-patch-functions.sh
+++ b/scripts/git-patch-functions.sh
@@ -129,4 +129,4 @@ currentAndDefaultBranchesShouldBeEqual () {
         
         exit 1
     fi
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-ignite/blob/237c50a3/scripts/git-patch-prop.sh
----------------------------------------------------------------------
diff --git a/scripts/git-patch-prop.sh b/scripts/git-patch-prop.sh
index 9ba8e35..7eb3639 100644
--- a/scripts/git-patch-prop.sh
+++ b/scripts/git-patch-prop.sh
@@ -19,7 +19,10 @@
 #
 # Git patch-file maker/applyer properties.
 #
+if [ "${IGNITE_DEFAULT_BRANCH}" = "" ]
+    then IGNITE_DEFAULT_BRANCH='sprint-2'
+fi
 
-IGNITE_DEFAULT_BRANCH='sprint-2'
-
-PATCHES_HOME=${IGNITE_HOME}
\ No newline at end of file
+if [ "${PATCHES_HOME}" = "" ]
+    then PATCHES_HOME=${GG_HOME}
+fi
\ No newline at end of file


Mime
View raw message