X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/ad3c9f2af814c84582fdd1649e49ec4f68572c5a..refs/heads/master:/xcodescripts/manpages.sh diff --git a/xcodescripts/manpages.sh b/xcodescripts/manpages.sh old mode 100644 new mode 100755 index fa84889..3141add --- a/xcodescripts/manpages.sh +++ b/xcodescripts/manpages.sh @@ -1,8 +1,9 @@ #!/bin/bash -e if [ "$ACTION" = installhdrs ]; then exit 0; fi -if [ "$PLATFORM_NAME" = iphoneos ]; then exit 0; fi -if [ "$PLATFORM_NAME" = iphonesimulator ]; then exit 0; fi +if [ "${PLATFORM_NAME}" != "macosx" ]; then exit 0; fi +if [ "${SKIP_MANPAGES}" = "YES" ]; then exit 0; fi +if [ "${DRIVERKIT}" = 1 ]; then exit 0; fi UNIFDEF_FLAGS=`${SRCROOT}/xcodescripts/generate_features.pl --unifdef` MANPAGES_LIST="${SRCROOT}/man/manpages.lst" @@ -13,6 +14,13 @@ cat ${MANPAGES_LIST} | grep -v -E '(^#|^\s*$)' | while read first solid rest; do ${FILES} EOF ) + + # This is a subshell, the real exit is after the loop. + if [ -z "${SOURCE}" ]; then + echo "Error: ${first} not found" + exit 1 + fi + SECTION=$(echo ${first} | tail -c 2) DESTDIR=${DSTROOT}/usr/share/man/man${SECTION} @@ -32,6 +40,11 @@ EOF done done +if [ $? -ne 0 ]; then + echo "Exiting due to previous error(s)." + exit 1 +fi + # grrr, uuid special case for page in libuuid.3 uuid_clear.3 uuid_compare.3 uuid_copy.3 uuid_generate.3 uuid_is_null.3 uuid_parse.3 uuid_unparse.3; do SECTION=$(echo ${page} | tail -c 2)