Add some extra checks for the osx-pkg.sh

This commit is contained in:
pancake 2015-03-11 15:28:39 +01:00
parent cc09d623fd
commit dfa47c074c

View File

@ -10,18 +10,23 @@ SRC=/tmp/r2osx
DST=`pwd`/sys/osx-pkg/radare2.unpkg
VERSION=0.9.9git
rm -rf ${SRC}
rm -rf "${SRC}"
make mrproper
./configure --prefix=/usr
make -j4
./configure --prefix=/usr || exit 1
make -j4 || exit 1
# TODO: run sys/install.sh
make install PREFIX=/usr DESTDIR=${SRC}
(
cd ${SRC}
find . | cpio -o --format odc | gzip -c > ${DST}/Payload
)
mkbom ${SRC} ${DST}/Bom
make install PREFIX=/usr DESTDIR=${SRC} || exit 1
if [ -d "${SRC}" ]; then
(
cd ${SRC} && \
find . | cpio -o --format odc | gzip -c > ${DST}/Payload
)
mkbom ${SRC} "${DST}/Bom"
# Repackage
# Repackage
pkgutil --flatten ${DST} ${DST}/../radare2-${VERSION}.pkg
pkgutil --flatten "${DST}" "${DST}/../radare2-${VERSION}.pkg"
else
echo "Failed install. DESTDIR is empty"
exit 1
fi