2
0
mirror of https://github.com/xcat2/xcat-dep.git synced 2024-11-27 03:39:11 +00:00

modified depending on comments

This commit is contained in:
xuweibj 2018-11-07 22:17:19 -05:00
parent 917aaf3e92
commit c15b527523
2 changed files with 9 additions and 11 deletions

View File

@ -1,7 +1,7 @@
#!/bin/bash
pkgname=$1
cur_path=$(cd "$(dirname "$0")"; pwd)
cur_path=$(dirname "$0")
if [ "$pkgname" = "ipmitool" ]; then
$cur_path/ipmitool/build.sh
exit $?

View File

@ -8,16 +8,14 @@ function check_linux_distro()
echo "${distro}"
}
build_dir=/ipmitool_build
if [ ${DEST} ]; then
build_dir=${DEST}
fi
pkgname="ipmitool"
build_dir=${DEST:-/${pkgname}_build}
XCAT_BUILD_DISTRO="$(check_linux_distro)"
echo "[INFO] Start to build ipmitool on $XCAT_BUILD_DISTRO"
echo "[INFO] Start to build $pkgname on $XCAT_BUILD_DISTRO"
cur_path=$(cd "$(dirname "$0")"; pwd)
cd $cur_path
cd "$(dirname "$0")"
XCAT_BUILD_DISTRO="$(check_linux_distro)"
case "${XCAT_BUILD_DISTRO}" in
@ -39,13 +37,13 @@ esac
$buildcmd |& tee /tmp/build.log
if [ $? != 0 ]; then
echo "[ERROR] Failed to build ipmitool by command $buildcmd"
echo "[ERROR] Failed to build $pkgname by command $buildcmd"
exit 1
fi
buildpath=`find $dftpath -name ipmitool*.$pkgtype | xargs ls -t | head -n 1`
buildpath=`find $dftpath -name ${pkgname}*.$pkgtype | xargs ls -t | head -n 1`
if [ -z "$buildpath" ]; then
echo "[ERROR] Could not find build ipmitool*.$pkgtype"
echo "[ERROR] Could not find build ${pkgname}*.$pkgtype"
exit 1
fi