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