cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bfede...@apache.org
Subject [19/50] [abbrv] git commit: updated refs/heads/ui-restyle to c64bfa5
Date Thu, 20 Feb 2014 19:17:25 GMT
package.sh: cleaning up formatting

No logic changes made. Tested no syntax errors added.


Project: http://git-wip-us.apache.org/repos/asf/cloudstack/repo
Commit: http://git-wip-us.apache.org/repos/asf/cloudstack/commit/dda47dbd
Tree: http://git-wip-us.apache.org/repos/asf/cloudstack/tree/dda47dbd
Diff: http://git-wip-us.apache.org/repos/asf/cloudstack/diff/dda47dbd

Branch: refs/heads/ui-restyle
Commit: dda47dbd67a45053f2700f5ed1784b0403af3316
Parents: 9dd57c2
Author: John Kinsella <jlk@stratosec.co>
Authored: Mon Feb 17 10:51:34 2014 -0800
Committer: John Kinsella <jlk@stratosec.co>
Committed: Mon Feb 17 10:51:34 2014 -0800

----------------------------------------------------------------------
 packaging/centos63/package.sh | 170 ++++++++++++++++++-------------------
 1 file changed, 81 insertions(+), 89 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/dda47dbd/packaging/centos63/package.sh
----------------------------------------------------------------------
diff --git a/packaging/centos63/package.sh b/packaging/centos63/package.sh
index bbd8eaa..fa004af 100755
--- a/packaging/centos63/package.sh
+++ b/packaging/centos63/package.sh
@@ -17,101 +17,93 @@
 # under the License.
 
 function usage() {
- echo ""
- echo "usage: ./package.sh [-p|--pack] [-h|--help] [ARGS]"
- echo ""
- echo "The commonly used Arguments are:"
- echo "oss|OSS             To package with only redistributable libraries (default)"
- echo "noredist|NOREDIST   To package with non-redistributable libraries"
- echo ""
- echo "Examples: ./package.sh -p|--pack oss|OSS"
- echo "          ./package.sh -p|--pack noredist|NOREDIST"
- echo "          ./package.sh (Default OSS)"
- exit 1
+    echo ""
+    echo "usage: ./package.sh [-p|--pack] [-h|--help] [ARGS]"
+    echo ""
+    echo "The commonly used Arguments are:"
+    echo "oss|OSS             To package with only redistributable libraries (default)"
+    echo "noredist|NOREDIST   To package with non-redistributable libraries"
+    echo ""
+    echo "Examples: ./package.sh -p|--pack oss|OSS"
+    echo "          ./package.sh -p|--pack noredist|NOREDIST"
+    echo "          ./package.sh (Default OSS)"
+    exit 1
 }
 
 function packaging() {
-	 
-CWD=`pwd`
-RPMDIR=$CWD/../../dist/rpmbuild
-PACK_PROJECT=cloudstack
-if [ -n "$1" ] ; then
-  DEFOSSNOSS="-D_ossnoss $packageval"
-fi
-
-
-VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version)
| grep --color=none '^[0-9]\.'`
-if echo $VERSION | grep SNAPSHOT ; then
-  REALVER=`echo $VERSION | cut -d '-' -f 1`
-  DEFVER="-D_ver $REALVER"
-  DEFPRE="-D_prerelease 1"
-  DEFREL="-D_rel SNAPSHOT"
-else
-  REALVER=`echo $VERSION`
-  DEFVER="-D_ver $REALVER"
-  DEFREL="-D_rel 1"
-fi
-
-mkdir -p $RPMDIR/SPECS
-mkdir -p $RPMDIR/BUILD
-mkdir -p $RPMDIR/RPMS
-mkdir -p $RPMDIR/SRPMS
-mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
-
-
-(cd ../../; tar -c --exclude .git --exclude dist  .  | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
-x )
-(cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION)
-
-cp cloud.spec $RPMDIR/SPECS
-
-(cd $RPMDIR; rpmbuild --define "_topdir $RPMDIR" "${DEFVER}" "${DEFREL}" ${DEFPRE+"${DEFPRE}"}
${DEFOSSNOSS+"$DEFOSSNOSS"} -bb SPECS/cloud.spec)
-
-exit
+    CWD=`pwd`
+    RPMDIR=$CWD/../../dist/rpmbuild
+    PACK_PROJECT=cloudstack
+    if [ -n "$1" ] ; then
+        DEFOSSNOSS="-D_ossnoss $packageval"
+    fi
+
+    VERSION=`(cd ../../; mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate -Dexpression=project.version)
| grep --color=none '^[0-9]\.'`
+    if echo $VERSION | grep SNAPSHOT ; then
+        REALVER=`echo $VERSION | cut -d '-' -f 1`
+        DEFVER="-D_ver $REALVER"
+        DEFPRE="-D_prerelease 1"
+        DEFREL="-D_rel SNAPSHOT"
+    else
+        REALVER=`echo $VERSION`
+        DEFVER="-D_ver $REALVER"
+        DEFREL="-D_rel 1"
+    fi
+
+    mkdir -p $RPMDIR/SPECS
+    mkdir -p $RPMDIR/BUILD
+    mkdir -p $RPMDIR/RPMS
+    mkdir -p $RPMDIR/SRPMS
+    mkdir -p $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
+
+    (cd ../../; tar -c --exclude .git --exclude dist  .  | tar -C $RPMDIR/SOURCES/$PACK_PROJECT-$VERSION
-x )
+    (cd $RPMDIR/SOURCES/; tar -czf $PACK_PROJECT-$VERSION.tgz $PACK_PROJECT-$VERSION)
+
+    cp cloud.spec $RPMDIR/SPECS
+
+    (cd $RPMDIR; rpmbuild --define "_topdir $RPMDIR" "${DEFVER}" "${DEFREL}" ${DEFPRE+"${DEFPRE}"}
${DEFOSSNOSS+"$DEFOSSNOSS"} -bb SPECS/cloud.spec)
+
+    exit
 }
 
-
 if [ $# -lt 1 ] ; then
-
-	packaging
-
+    packaging
 elif [ $# -gt 0 ] ; then
-
-	SHORTOPTS="hp:"
-	LONGOPTS="help,pack:"
-
-	ARGS=$(getopt -s bash -u -a --options $SHORTOPTS  --longoptions $LONGOPTS --name $0 -- "$@"
)
-	eval set -- "$ARGS"
-
-	while [ $# -gt 0 ] ; do
-	case "$1" in
-	-h | --help)
-		usage
-		exit 0
-		;;
-	-p | --pack)
-		echo "Doing CloudStack Packaging ....."
-		packageval=$2
-		if [ "$packageval" == "oss" -o "$packageval" == "OSS" ] ; then
-			packaging
-		elif [ "$packageval" == "noredist" -o "$packageval" == "NOREDIST" ] ; then
-			packaging noredist
-		else
-			echo "Error: Incorrect value provided in package.sh script, Please see help ./package.sh
--help|-h for more details."
-			exit 1
-		fi
-		;;
-	-)
-		echo "Unrecognized option..."
-		usage
-		exit 1
-		;;
-	*)
-		shift
-		;;
-	esac
-	done
-
+    SHORTOPTS="hp:"
+    LONGOPTS="help,pack:"
+
+    ARGS=$(getopt -s bash -u -a --options $SHORTOPTS  --longoptions $LONGOPTS --name $0 --
"$@" )
+    eval set -- "$ARGS"
+
+    while [ $# -gt 0 ] ; do
+        case "$1" in
+            -h | --help)
+            usage
+            exit 0
+            ;;
+        -p | --pack)
+            echo "Doing CloudStack Packaging ....."
+            packageval=$2
+            if [ "$packageval" == "oss" -o "$packageval" == "OSS" ] ; then
+                packaging
+            elif [ "$packageval" == "noredist" -o "$packageval" == "NOREDIST" ] ; then
+                packaging noredist
+            else
+                echo "Error: Incorrect value provided in package.sh script, Please see help
./package.sh --help|-h for more details."
+                exit 1
+            fi
+            ;;
+        -)
+            echo "Unrecognized option..."
+            usage
+            exit 1
+            ;;
+        *)
+            shift
+            ;;
+        esac
+    done
 else
-	echo "Incorrect choice.  Nothing to do." >&2
-	echo "Please, execute ./package.sh --help for more help"
+    echo "Incorrect choice.  Nothing to do." >&2
+    echo "Please, execute ./package.sh --help for more help"
 fi


Mime
View raw message