From 682270f20dcd8ce610c0d4a6fe7c8b4f671437b1 Mon Sep 17 00:00:00 2001 From: xuweibj Date: Thu, 8 Nov 2018 00:40:02 -0500 Subject: [PATCH] modified depending on comments --- build.sh | 7 ++++--- ipmitool/build.sh | 3 ++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 56f29f2..de6927f 100755 --- a/build.sh +++ b/build.sh @@ -2,10 +2,11 @@ pkgname=$1 cur_path=$(dirname "$0") -if [ "$pkgname" = "ipmitool" ]; then - $cur_path/ipmitool/build.sh +if [ "$pkgname" ]; then + $cur_path/$pkgname/build.sh exit $? -elif [ -z $pkgname ]; then +else + # TODO: if not specify, build all packages for xcat-dep echo "Please specify package want to build" exit 1 fi diff --git a/ipmitool/build.sh b/ipmitool/build.sh index 61658d8..572e74e 100755 --- a/ipmitool/build.sh +++ b/ipmitool/build.sh @@ -15,7 +15,8 @@ build_dir=${DEST:-/${pkgname}_build} XCAT_BUILD_DISTRO="$(check_linux_distro)" echo "[INFO] Start to build $pkgname on $XCAT_BUILD_DISTRO" -cd "$(dirname "$0")" +cur_path=$(dirname "$0") +cd $cur_path XCAT_BUILD_DISTRO="$(check_linux_distro)" case "${XCAT_BUILD_DISTRO}" in