You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@accumulo.apache.org by ct...@apache.org on 2015/05/11 20:08:49 UTC
[1/6] accumulo git commit: ACCUMULO-3786 Add error checks to
build_native_library.sh
Repository: accumulo
Updated Branches:
refs/heads/1.6 fa22fa431 -> 7813f507b
refs/heads/1.7 9546b10a7 -> 98f42c762
refs/heads/master bc4874ca6 -> 5e0552741
ACCUMULO-3786 Add error checks to build_native_library.sh
* Adds additional error checks when building native library
* Incorporates script style standards from ACCUMULO-2423 back to 1.6 branch (to ease merging)
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7813f507
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7813f507
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7813f507
Branch: refs/heads/1.6
Commit: 7813f507b49ed4247c17b365d5dcbe78da4c6ec5
Parents: fa22fa4
Author: Christopher Tubbs <ct...@apache.org>
Authored: Mon May 11 14:02:16 2015 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Mon May 11 14:02:16 2015 -0400
----------------------------------------------------------------------
assemble/bin/build_native_library.sh | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/7813f507/assemble/bin/build_native_library.sh
----------------------------------------------------------------------
diff --git a/assemble/bin/build_native_library.sh b/assemble/bin/build_native_library.sh
index 907ce2c..c2531ee 100755
--- a/assemble/bin/build_native_library.sh
+++ b/assemble/bin/build_native_library.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#! /usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@@ -17,18 +17,18 @@
# Start: Resolve Script Directory
SOURCE="${BASH_SOURCE[0]}"
-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
- bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+while [[ -h "$SOURCE" ]]; do # resolve $SOURCE until the file is no longer a symlink
+ bin=$( cd -P "$( dirname "$SOURCE" )" && pwd )
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$bin/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
-bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+bin=$( cd -P "$( dirname "$SOURCE" )" && pwd )
script=$( basename "$SOURCE" )
# Stop: Resolve Script Directory
-lib="${bin}/../lib"
-native_tarball="${lib}/accumulo-native.tar.gz"
+lib=${bin}/../lib
+native_tarball=${lib}/accumulo-native.tar.gz
final_native_target="${lib}/native"
if [[ ! -f $native_tarball ]]; then
@@ -37,36 +37,36 @@ if [[ ! -f $native_tarball ]]; then
fi
# Make the destination for the native library
-mkdir -p "${final_native_target}"
+mkdir -p "${final_native_target}" || exit 1
# Make a directory for us to unpack the native source into
-TMP_DIR=`mktemp -d /tmp/accumulo-native.XXXX` || exit 1
+TMP_DIR=$(mktemp -d /tmp/accumulo-native.XXXX) || exit 1
# Unpack the tarball to our temp directory
tar xf "${native_tarball}" -C "${TMP_DIR}"
-if [[ $? -ne 0 ]]; then
+if [[ $? != 0 ]]; then
echo "Failed to unpack native tarball to ${TMP_DIR}"
exit 1
fi
# Move to the first (only) directory in our unpacked tarball
-native_dir=`find "${TMP_DIR}" -maxdepth 1 -mindepth 1 -type d`
+native_dir=$(find "${TMP_DIR}" -maxdepth 1 -mindepth 1 -type d)
-cd "${native_dir}"
+cd "${native_dir}" || exit 1
# Make the native library
-export USERFLAGS=$@
+export USERFLAGS="$@"
make
# Make sure it didn't fail
-if [[ $? -ne 0 ]]; then
+if [[ $? != 0 ]]; then
echo "Make failed!"
exit 1
fi
# "install" the artifact
-cp libaccumulo.* "${final_native_target}"
+cp libaccumulo.* "${final_native_target}" || exit 1
# Clean up our temp directory
rm -rf "${TMP_DIR}"
[4/6] accumulo git commit: Merge branch '1.6' into 1.7
Posted by ct...@apache.org.
Merge branch '1.6' into 1.7
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/98f42c76
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/98f42c76
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/98f42c76
Branch: refs/heads/master
Commit: 98f42c7629b470f2d1833603a834a18fc59f7776
Parents: 9546b10 7813f50
Author: Christopher Tubbs <ct...@apache.org>
Authored: Mon May 11 14:06:42 2015 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Mon May 11 14:06:42 2015 -0400
----------------------------------------------------------------------
assemble/bin/build_native_library.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[5/6] accumulo git commit: Merge branch '1.6' into 1.7
Posted by ct...@apache.org.
Merge branch '1.6' into 1.7
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/98f42c76
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/98f42c76
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/98f42c76
Branch: refs/heads/1.7
Commit: 98f42c7629b470f2d1833603a834a18fc59f7776
Parents: 9546b10 7813f50
Author: Christopher Tubbs <ct...@apache.org>
Authored: Mon May 11 14:06:42 2015 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Mon May 11 14:06:42 2015 -0400
----------------------------------------------------------------------
assemble/bin/build_native_library.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[2/6] accumulo git commit: ACCUMULO-3786 Add error checks to
build_native_library.sh
Posted by ct...@apache.org.
ACCUMULO-3786 Add error checks to build_native_library.sh
* Adds additional error checks when building native library
* Incorporates script style standards from ACCUMULO-2423 back to 1.6 branch (to ease merging)
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7813f507
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7813f507
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7813f507
Branch: refs/heads/1.7
Commit: 7813f507b49ed4247c17b365d5dcbe78da4c6ec5
Parents: fa22fa4
Author: Christopher Tubbs <ct...@apache.org>
Authored: Mon May 11 14:02:16 2015 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Mon May 11 14:02:16 2015 -0400
----------------------------------------------------------------------
assemble/bin/build_native_library.sh | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/7813f507/assemble/bin/build_native_library.sh
----------------------------------------------------------------------
diff --git a/assemble/bin/build_native_library.sh b/assemble/bin/build_native_library.sh
index 907ce2c..c2531ee 100755
--- a/assemble/bin/build_native_library.sh
+++ b/assemble/bin/build_native_library.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#! /usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@@ -17,18 +17,18 @@
# Start: Resolve Script Directory
SOURCE="${BASH_SOURCE[0]}"
-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
- bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+while [[ -h "$SOURCE" ]]; do # resolve $SOURCE until the file is no longer a symlink
+ bin=$( cd -P "$( dirname "$SOURCE" )" && pwd )
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$bin/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
-bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+bin=$( cd -P "$( dirname "$SOURCE" )" && pwd )
script=$( basename "$SOURCE" )
# Stop: Resolve Script Directory
-lib="${bin}/../lib"
-native_tarball="${lib}/accumulo-native.tar.gz"
+lib=${bin}/../lib
+native_tarball=${lib}/accumulo-native.tar.gz
final_native_target="${lib}/native"
if [[ ! -f $native_tarball ]]; then
@@ -37,36 +37,36 @@ if [[ ! -f $native_tarball ]]; then
fi
# Make the destination for the native library
-mkdir -p "${final_native_target}"
+mkdir -p "${final_native_target}" || exit 1
# Make a directory for us to unpack the native source into
-TMP_DIR=`mktemp -d /tmp/accumulo-native.XXXX` || exit 1
+TMP_DIR=$(mktemp -d /tmp/accumulo-native.XXXX) || exit 1
# Unpack the tarball to our temp directory
tar xf "${native_tarball}" -C "${TMP_DIR}"
-if [[ $? -ne 0 ]]; then
+if [[ $? != 0 ]]; then
echo "Failed to unpack native tarball to ${TMP_DIR}"
exit 1
fi
# Move to the first (only) directory in our unpacked tarball
-native_dir=`find "${TMP_DIR}" -maxdepth 1 -mindepth 1 -type d`
+native_dir=$(find "${TMP_DIR}" -maxdepth 1 -mindepth 1 -type d)
-cd "${native_dir}"
+cd "${native_dir}" || exit 1
# Make the native library
-export USERFLAGS=$@
+export USERFLAGS="$@"
make
# Make sure it didn't fail
-if [[ $? -ne 0 ]]; then
+if [[ $? != 0 ]]; then
echo "Make failed!"
exit 1
fi
# "install" the artifact
-cp libaccumulo.* "${final_native_target}"
+cp libaccumulo.* "${final_native_target}" || exit 1
# Clean up our temp directory
rm -rf "${TMP_DIR}"
[6/6] accumulo git commit: Merge branch '1.7'
Posted by ct...@apache.org.
Merge branch '1.7'
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/5e055274
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/5e055274
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/5e055274
Branch: refs/heads/master
Commit: 5e05527410cccc934be25e8badbb868974e9ddff
Parents: bc4874c 98f42c7
Author: Christopher Tubbs <ct...@apache.org>
Authored: Mon May 11 14:08:16 2015 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Mon May 11 14:08:16 2015 -0400
----------------------------------------------------------------------
assemble/bin/build_native_library.sh | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
[3/6] accumulo git commit: ACCUMULO-3786 Add error checks to
build_native_library.sh
Posted by ct...@apache.org.
ACCUMULO-3786 Add error checks to build_native_library.sh
* Adds additional error checks when building native library
* Incorporates script style standards from ACCUMULO-2423 back to 1.6 branch (to ease merging)
Project: http://git-wip-us.apache.org/repos/asf/accumulo/repo
Commit: http://git-wip-us.apache.org/repos/asf/accumulo/commit/7813f507
Tree: http://git-wip-us.apache.org/repos/asf/accumulo/tree/7813f507
Diff: http://git-wip-us.apache.org/repos/asf/accumulo/diff/7813f507
Branch: refs/heads/master
Commit: 7813f507b49ed4247c17b365d5dcbe78da4c6ec5
Parents: fa22fa4
Author: Christopher Tubbs <ct...@apache.org>
Authored: Mon May 11 14:02:16 2015 -0400
Committer: Christopher Tubbs <ct...@apache.org>
Committed: Mon May 11 14:02:16 2015 -0400
----------------------------------------------------------------------
assemble/bin/build_native_library.sh | 28 ++++++++++++++--------------
1 file changed, 14 insertions(+), 14 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/accumulo/blob/7813f507/assemble/bin/build_native_library.sh
----------------------------------------------------------------------
diff --git a/assemble/bin/build_native_library.sh b/assemble/bin/build_native_library.sh
index 907ce2c..c2531ee 100755
--- a/assemble/bin/build_native_library.sh
+++ b/assemble/bin/build_native_library.sh
@@ -1,4 +1,4 @@
-#!/usr/bin/env bash
+#! /usr/bin/env bash
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
@@ -17,18 +17,18 @@
# Start: Resolve Script Directory
SOURCE="${BASH_SOURCE[0]}"
-while [ -h "$SOURCE" ]; do # resolve $SOURCE until the file is no longer a symlink
- bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+while [[ -h "$SOURCE" ]]; do # resolve $SOURCE until the file is no longer a symlink
+ bin=$( cd -P "$( dirname "$SOURCE" )" && pwd )
SOURCE="$(readlink "$SOURCE")"
[[ $SOURCE != /* ]] && SOURCE="$bin/$SOURCE" # if $SOURCE was a relative symlink, we need to resolve it relative to the path where the symlink file was located
done
-bin="$( cd -P "$( dirname "$SOURCE" )" && pwd )"
+bin=$( cd -P "$( dirname "$SOURCE" )" && pwd )
script=$( basename "$SOURCE" )
# Stop: Resolve Script Directory
-lib="${bin}/../lib"
-native_tarball="${lib}/accumulo-native.tar.gz"
+lib=${bin}/../lib
+native_tarball=${lib}/accumulo-native.tar.gz
final_native_target="${lib}/native"
if [[ ! -f $native_tarball ]]; then
@@ -37,36 +37,36 @@ if [[ ! -f $native_tarball ]]; then
fi
# Make the destination for the native library
-mkdir -p "${final_native_target}"
+mkdir -p "${final_native_target}" || exit 1
# Make a directory for us to unpack the native source into
-TMP_DIR=`mktemp -d /tmp/accumulo-native.XXXX` || exit 1
+TMP_DIR=$(mktemp -d /tmp/accumulo-native.XXXX) || exit 1
# Unpack the tarball to our temp directory
tar xf "${native_tarball}" -C "${TMP_DIR}"
-if [[ $? -ne 0 ]]; then
+if [[ $? != 0 ]]; then
echo "Failed to unpack native tarball to ${TMP_DIR}"
exit 1
fi
# Move to the first (only) directory in our unpacked tarball
-native_dir=`find "${TMP_DIR}" -maxdepth 1 -mindepth 1 -type d`
+native_dir=$(find "${TMP_DIR}" -maxdepth 1 -mindepth 1 -type d)
-cd "${native_dir}"
+cd "${native_dir}" || exit 1
# Make the native library
-export USERFLAGS=$@
+export USERFLAGS="$@"
make
# Make sure it didn't fail
-if [[ $? -ne 0 ]]; then
+if [[ $? != 0 ]]; then
echo "Make failed!"
exit 1
fi
# "install" the artifact
-cp libaccumulo.* "${final_native_target}"
+cp libaccumulo.* "${final_native_target}" || exit 1
# Clean up our temp directory
rm -rf "${TMP_DIR}"