You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by bu...@apache.org on 2018/03/06 18:44:52 UTC
[3/4] hbase git commit: HBASE-20134 dev-support scripts should use
mktemp instead of hard-coding /tmp.
HBASE-20134 dev-support scripts should use mktemp instead of hard-coding /tmp.
Signed-off-by: Mike Drob <md...@apache.org>
Conflicts:
dev-support/jenkins-scripts/generate-hbase-website.sh
Project: http://git-wip-us.apache.org/repos/asf/hbase/repo
Commit: http://git-wip-us.apache.org/repos/asf/hbase/commit/57c70a98
Tree: http://git-wip-us.apache.org/repos/asf/hbase/tree/57c70a98
Diff: http://git-wip-us.apache.org/repos/asf/hbase/diff/57c70a98
Branch: refs/heads/branch-1.3
Commit: 57c70a98f8e92a11d044feee770872ad8f7b0032
Parents: 4fc36c6
Author: Sean Busbey <bu...@apache.org>
Authored: Mon Mar 5 23:40:25 2018 -0600
Committer: Sean Busbey <bu...@apache.org>
Committed: Tue Mar 6 12:43:49 2018 -0600
----------------------------------------------------------------------
dev-support/hbase_nightly_source-artifact.sh | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/hbase/blob/57c70a98/dev-support/hbase_nightly_source-artifact.sh
----------------------------------------------------------------------
diff --git a/dev-support/hbase_nightly_source-artifact.sh b/dev-support/hbase_nightly_source-artifact.sh
index b334fa5..9458324 100755
--- a/dev-support/hbase_nightly_source-artifact.sh
+++ b/dev-support/hbase_nightly_source-artifact.sh
@@ -21,7 +21,7 @@ function usage {
echo "Usage: ${0} [options] /path/to/component/checkout"
echo ""
echo " --intermediate-file-dir /path/to/use Path for writing listings and diffs. must exist."
- echo " defaults to making a directory in /tmp."
+ echo " defaults to making a directory via mktemp."
echo " --unpack-temp-dir /path/to/use Path for unpacking tarball. default to"
echo " 'unpacked_src_tarball' in intermediate directory."
echo " --maven-m2-initial /path/to/use Path for maven artifacts while building in"
@@ -67,11 +67,10 @@ fi
component_dir="$(cd "$(dirname "$1")"; pwd)/$(basename "$1")"
if [ -z "${working_dir}" ]; then
- working_dir=/tmp
- while [[ -e ${working_dir} ]]; do
- working_dir=/tmp/hbase-srctarball-test-${RANDOM}.${RANDOM}
- done
- mkdir "${working_dir}"
+ if ! working_dir="$(mktemp -d -t hbase-srctarball-test)" ; then
+ echo "Failed to create temporary working directory. Please specify via --unpack-temp-dir"
+ exit 1
+ fi
else
# absolutes please
working_dir="$(cd "$(dirname "${working_dir}")"; pwd)/$(basename "${working_dir}")"