Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 74922200BBD for ; Tue, 8 Nov 2016 16:41:06 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 730A8160B0A; Tue, 8 Nov 2016 15:41:06 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id BC43D160AD0 for ; Tue, 8 Nov 2016 16:41:05 +0100 (CET) Received: (qmail 20736 invoked by uid 500); 8 Nov 2016 15:41:04 -0000 Mailing-List: contact dev-help@accumulo.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@accumulo.apache.org Delivered-To: mailing list dev@accumulo.apache.org Received: (qmail 20720 invoked by uid 99); 8 Nov 2016 15:41:04 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 08 Nov 2016 15:41:04 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 59F94E0AF6; Tue, 8 Nov 2016 15:41:04 +0000 (UTC) From: mikewalch To: dev@accumulo.apache.org Reply-To: dev@accumulo.apache.org References: In-Reply-To: Subject: [GitHub] accumulo pull request #160: ACCUMULO-4490: Simplify Accumulo scripts and con... Content-Type: text/plain Message-Id: <20161108154104.59F94E0AF6@git1-us-west.apache.org> Date: Tue, 8 Nov 2016 15:41:04 +0000 (UTC) archived-at: Tue, 08 Nov 2016 15:41:06 -0000 Github user mikewalch commented on a diff in the pull request: https://github.com/apache/accumulo/pull/160#discussion_r87014858 --- Diff: assemble/bin/accumulo --- @@ -15,173 +15,567 @@ # See the License for the specific language governing permissions and # limitations under the License. -# 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 )" - 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 )" -script=$( basename "${SOURCE}" ) -# Stop: Resolve Script Directory +function build_native() { + native_tarball="$basedir/lib/accumulo-native.tar.gz" + final_native_target="$basedir/lib/native" -. "${bin}"/config.sh + if [[ ! -f $native_tarball ]]; then + echo "Could not find native code artifact: ${native_tarball}"; + exit 1 + fi -START_JAR="${ACCUMULO_HOME}/lib/accumulo-start.jar" + # Make the destination for the native library + mkdir -p "${final_native_target}" || exit 1 -# -# Resolve a program to its installation directory -# -locationByProgram() -{ - RESULT=$( which "$1" ) - if [[ "$?" != 0 && -z "${RESULT}" ]]; then - echo "Cannot find '$1' and '$2' is not set in $ACCUMULO_CONF_DIR/accumulo-env.sh" + # Make a directory for us to unpack the native source into + TMP_DIR=$(mktemp -d /tmp/accumulo-native.XXXX) || exit 1 --- End diff -- I think this should be another issue. It might be better to build native libs from Java rather than making these scripts more complicated. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled but not working, please contact infrastructure at infrastructure@apache.org or file a JIRA ticket with INFRA. ---