From b319523ae31fe1003ea691cfde4a6e6ee193afd7 Mon Sep 17 00:00:00 2001 From: robin2008 Date: Tue, 7 Aug 2018 13:37:25 +0800 Subject: [PATCH] put the tarball directly under --- build-ubunturepo | 11 +++-------- buildcore.sh | 12 +++--------- 2 files changed, 6 insertions(+), 17 deletions(-) diff --git a/build-ubunturepo b/build-ubunturepo index cb6d86892..260adadb0 100755 --- a/build-ubunturepo +++ b/build-ubunturepo @@ -28,7 +28,6 @@ # # DEST= - provide a directory to contains the build result # -# BUILDDESTDIR= - Copy build core tarball to BUILDDESTDIR if defined # For the dependency packages 1. All the xcat dependency deb packages should be uploaded to # "pokgsa/projects/x/xcat/build/ubuntu/xcat-dep/debs/" on GSA # 2. run ./build-ubunturepo -d @@ -399,14 +398,10 @@ __EOF__ chgrp root $tar_name chmod g+w $tar_name - if [ "$BUILDDESTDIR" ]; then - rm -rf $BUILDDESTDIR - mkdir -p $BUILDDESTDIR - cp $tar_name $BUILDDESTDIR + if [ -n "$DEST" ]; then + ln -sf $(basename `pwd`)/$tar_name ../$tar_name if [ $? != 0 ]; then - echo "Failed to copy $tar_name to $BUILDDESTDIR" - else - echo "Copied $tar_name to $BUILDDESTDIR" + echo "ERROR: Failed to make symbol link $DEST/$tar_name" fi fi diff --git a/buildcore.sh b/buildcore.sh index f72b4a0b2..3295db7ca 100755 --- a/buildcore.sh +++ b/buildcore.sh @@ -32,8 +32,6 @@ # GPGSIGN/RPMSIGN=0 or GPGSIGN/RPMSIGN=1 - Sign the RPMs using the keys on GSA, the default is to sign the rpms without GPGSIGN/RPMSIGN specified # DEST= - provide a directory to contains the build result # -# BUILDDESTDIR= - Copy build core tarball to BUILDDESTDIR if defined -# # The following environment variables can be modified if you need # @@ -585,14 +583,10 @@ fi chgrp $SYSGRP $TARNAME chmod g+w $TARNAME -if [ "$BUILDDESTDIR" ]; then - rm -rf $BUILDDESTDIR - mkdir -p $BUILDDESTDIR - cp $TARNAME $BUILDDESTDIR +if [ -n "$DEST" ]; then + ln -sf $(basename `pwd`)/$TARNAME ../$TARNAME if [ $? != 0 ]; then - echo "Failed to copy $TARNAME to $BUILDDESTDIR" - else - echo "Copied $TARNAME to $BUILDDESTDIR" + echo "ERROR: Failed to make symbol link $DEST/$TARNAME" fi fi