Explorar o código

adding some verbose checks where applicable

Kevin Bradley %!s(int64=3) %!d(string=hai) anos
pai
achega
2a07b1b29d
Modificáronse 1 ficheiros con 34 adicións e 26 borrados
  1. 34 26
      the_memo2.sh

+ 34 - 26
the_memo2.sh

@@ -17,6 +17,7 @@ SDK_PATH="$(xcrun --sdk $PLATFORM_LOWER --show-sdk-path)"
 SPEAK="true"
 EXTRA_LD_FLAGS=""
 HOST="aarch64"
+LOG_VERBOSE=""
 
 if [[ ! -d $ALREADY_BUILT ]]; then
 	mkdir -p $ALREADY_BUILT
@@ -134,21 +135,20 @@ buildProduct() {
 	export CXXFLAGS=$CFLAGS
 	export LDFLAGS="-arch arm64 -isysroot $SDKROOT -L$SKEL_PREFIX/$ROOT_PREFIX/lib/ $EXTRA_LD_FLAGS"
 	sayIfVerbal "configuring $PKG_NAME"
-	./configure --prefix=/$ROOT_PREFIX --host=$HOST-apple-darwin --target=$HOST-apple-darwin --disable-dependency-tracking --without-manpages --disable-tests $EXTRA_CFG
-	#(./configure --prefix=/$ROOT_PREFIX --host=$HOST-apple-darwin --target=$HOST-apple-darwin --disable-dependency-tracking --without-manpages --disable-tests $EXTRA_CFG > "${LOG_FILE}" 2>&1) #& spinner
+	if [[ $LOG_VERBOSE == "verbose"* ]]; then
+		./configure --prefix=/$ROOT_PREFIX --host=$HOST-apple-darwin --target=$HOST-apple-darwin --disable-dependency-tracking --without-manpages --disable-tests $EXTRA_CFG | tee "${LOG_FILE}"
+	else
+		(./configure --prefix=/$ROOT_PREFIX --host=$HOST-apple-darwin --target=$HOST-apple-darwin --disable-dependency-tracking --without-manpages --disable-tests $EXTRA_CFG > "${LOG_FILE}" 2>&1)
+	fi
 	checkStatus $PKG_NAME $? "false"
 	sayIfVerbal "making $PKG_NAME"
 	echo "\n\nPOST CONFIGURE\n\n" >> "$LOG_FILE"
-	make -j8 DESTDIR="$SKEL_PREFIX" install
-	#(make -j8 DESTDIR="$SKEL_PREFIX" install >> "${LOG_FILE}" 2>&1) #& spinner
+	if [[ $LOG_VERBOSE == "verbose"* ]]; then
+		make -j8 DESTDIR="$SKEL_PREFIX" install | tee -a "${LOG_FILE}"
+	else
+		(make -j8 DESTDIR="$SKEL_PREFIX" install >> "${LOG_FILE}" 2>&1) #& spinner
+	fi
 	checkStatus $PKG_NAME $? "true"
-	#if [[ $? != 0 ]]; then
-	#    echo "make returned with non zero: $?"
-	#    exit $?
-	#else
-	#    echo "make returned with zero"
-	#    setBuilt $PKG_NAME
-	#fi
 	cd "$BUILD_ROOT"
 }
 
@@ -800,11 +800,19 @@ buildOpenSSL() {
 		export CROSS_TOP="$(xcode-select --print-path)/Platforms/$PLATFORM.platform/Developer"
 		export CROSS_SDK="$(echo $SDK_PATH | sed 's/.*\///g')"
 		sayIfVerbal "Configuring openSSL"
-		(./Configure ios64-cross no-dso no-hw no-engine --prefix="/$ROOT_PREFIX" > "$LOG_FILE" 2>&1)
+		if [[ $LOG_VERBOSE == "verbose"* ]]; then
+			./Configure ios64-cross no-dso no-hw no-engine --prefix="/$ROOT_PREFIX" | tee "${LOG_FILE}"
+		else
+			(./Configure ios64-cross no-dso no-hw no-engine --prefix="/$ROOT_PREFIX" > "$LOG_FILE" 2>&1)
+		fi
 		checkStatus $PKG_NAME $? "false"
 		echo "\n\nPOST CONFIGURE\n\n" >> "$LOG_FILE"
 		sayIfVerbal "making openSSL"
-		(make DESTDIR="$SKEL_PREFIX" install >> "${LOG_FILE}" 2>&1)
+		if [[ $LOG_VERBOSE == "verbose"* ]]; then
+			make DESTDIR="$SKEL_PREFIX" install | tee -a "${LOG_FILE}"
+		else
+			(make DESTDIR="$SKEL_PREFIX" install >> "${LOG_FILE}" 2>&1)
+		fi
 		checkStatus $PKG_NAME $? "true"
 		cd "$BUILD_ROOT"
 	fi
@@ -915,19 +923,19 @@ buildGpgError() {
 patchGcrypt() {
 	if [[ "$PLATFORM" == "AppleTVOS" ]]; then
 		#if [[ "$PKG_VERSION" == "1.8.2-1" ]]; then
-			cat tests/random.c | head -n 39 > random.patched.c
-			echo "#include <stdint.h>" >> random.patched.c
-			echo "#include <stdio.h>" >> random.patched.c
-			echo "#include <stdlib.h>" >> random.patched.c
-			echo "#include <spawn.h>" >> random.patched.c
-			echo "#include <sys/wait.h>" >> random.patched.c
-			echo "#include <sys/stat.h>" >> random.patched.c
-			echo "" >> random.patched.c
-			echo "extern char **environ;" >> random.patched.c
-			echo "" >> random.patched.c
-			fixSystem "random.patched.c"
-			cat tests/random.c | tail -n 727 | sed 's/system (cmdline)/RunCmd(cmdline)/g' >> random.patched.c
-			cp random.patched.c tests/random.c
+		cat tests/random.c | head -n 39 > random.patched.c
+		echo "#include <stdint.h>" >> random.patched.c
+		echo "#include <stdio.h>" >> random.patched.c
+		echo "#include <stdlib.h>" >> random.patched.c
+		echo "#include <spawn.h>" >> random.patched.c
+		echo "#include <sys/wait.h>" >> random.patched.c
+		echo "#include <sys/stat.h>" >> random.patched.c
+		echo "" >> random.patched.c
+		echo "extern char **environ;" >> random.patched.c
+		echo "" >> random.patched.c
+		fixSystem "random.patched.c"
+		cat tests/random.c | tail -n 727 | sed 's/system (cmdline)/RunCmd(cmdline)/g' >> random.patched.c
+		cp random.patched.c tests/random.c
 		#fi
 	fi
 }