X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=functions%2Fipkg;h=bba883d768aee736e40c30e454678677a905fc68;hb=9e9a9c06d74ed4281c347ae1e5ade74909b5d2d2;hp=77f51c4d92e050f050213ef7713f532ec8822430;hpb=2b86b5b69df77007ae7fd31fc1ae39361a1a9019;p=hvlinux.git diff --git a/functions/ipkg b/functions/ipkg index 77f51c4..bba883d 100644 --- a/functions/ipkg +++ b/functions/ipkg @@ -97,20 +97,24 @@ ipkg_finish() # Make sure to return to scripts directory cd ${SCRDIR} - # Saving package build size in global variable - BUILD_SIZE=$(du -h -s -c ${LFS_TMP}/${PACKAGE} ${LFS_TMP}/${PACKAGE}-build | grep total | awk '{ print $1 }') - - # Some scripts need to preserve the source or build directory. They can - # do so by renaming them. - if [ -d ${LFS_TMP}/${PACKAGE} ]; then - # Removing source directory - echo "Removing source directory" - rm -rf ${LFS_TMP}/${PACKAGE} - fi - if [ -d ${LFS_TMP}/${PACKAGE}-build ]; then - # Removing build directory - echo "Removing build directory" - rm -rf ${LFS_TMP}/${PACKAGE}-build + if [ "x${DECOMPRESS}" = "x1" ]; then + # Saving package build size in global variable + BUILD_SIZE=$(du -h -s -c ${LFS_TMP}/${PACKAGE} ${LFS_TMP}/${PACKAGE}-build | grep total | awk '{ print $1 }') + + # Some scripts need to preserve the source or build directory. They can + # do so by renaming them. + if [ -d ${LFS_TMP}/${PACKAGE} ]; then + # Removing source directory + echo "Removing source directory" + rm -rf ${LFS_TMP}/${PACKAGE} + fi + if [ -d ${LFS_TMP}/${PACKAGE}-build ]; then + # Removing build directory + echo "Removing build directory" + rm -rf ${LFS_TMP}/${PACKAGE}-build + fi + else + BUILD_SIZE="Unknown" fi } @@ -126,7 +130,11 @@ ipkg_script() PACKAGE_DEF=${SCRDIR}/pkg/$(get_pkg_name ${PACKAGE}) fi - ipkg_decompress_package + if [ "x${DECOMPRESS}" = "x1" ]; then + ipkg_decompress_package + else + SOURCE_SIZE="Unknown" + fi if [ -f ${PACKAGE_DEF} ]; then echo "Load custom package functions and definitions from ${PACKAGE_DEF}"