Add spinner for progress
This commit is contained in:
parent
a8aeebfac5
commit
ae252f2d30
|
@ -35,7 +35,20 @@ ENABLE_EC_NISTP_64_GCC_128=""
|
||||||
# Don't change anything under this line! #
|
# Don't change anything under this line! #
|
||||||
# #
|
# #
|
||||||
###########################################################################
|
###########################################################################
|
||||||
|
spinner()
|
||||||
|
{
|
||||||
|
local pid=$!
|
||||||
|
local delay=0.75
|
||||||
|
local spinstr='|/-\'
|
||||||
|
while [ "$(ps a | awk '{print $1}' | grep $pid)" ]; do
|
||||||
|
local temp=${spinstr#?}
|
||||||
|
printf " [%c] " "$spinstr"
|
||||||
|
local spinstr=$temp${spinstr%"$temp"}
|
||||||
|
sleep $delay
|
||||||
|
printf "\b\b\b\b\b\b"
|
||||||
|
done
|
||||||
|
printf " \b\b\b\b"
|
||||||
|
}
|
||||||
|
|
||||||
CURRENTPATH=`pwd`
|
CURRENTPATH=`pwd`
|
||||||
ARCHS="i386 x86_64 armv7 armv7s arm64 tv_x86_64 tv_arm64"
|
ARCHS="i386 x86_64 armv7 armv7s arm64 tv_x86_64 tv_arm64"
|
||||||
|
@ -135,12 +148,12 @@ do
|
||||||
export CC="${BUILD_TOOLS}/usr/bin/gcc -arch ${ARCH}"
|
export CC="${BUILD_TOOLS}/usr/bin/gcc -arch ${ARCH}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo " Configure..."
|
echo " Configure...\c"
|
||||||
set +e
|
set +e
|
||||||
if [ "${ARCH}" == "x86_64" ]; then
|
if [ "${ARCH}" == "x86_64" ]; then
|
||||||
./Configure no-asm darwin64-x86_64-cc --openssldir="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" ${LOCAL_CONFIG_OPTIONS} > "${LOG}" 2>&1
|
(./Configure no-asm darwin64-x86_64-cc --openssldir="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" ${LOCAL_CONFIG_OPTIONS} > "${LOG}" 2>&1) & spinner
|
||||||
else
|
else
|
||||||
./Configure iphoneos-cross --openssldir="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" ${LOCAL_CONFIG_OPTIONS} > "${LOG}" 2>&1
|
(./Configure iphoneos-cross --openssldir="${CURRENTPATH}/bin/${PLATFORM}${SDKVERSION}-${ARCH}.sdk" ${LOCAL_CONFIG_OPTIONS} > "${LOG}" 2>&1) & spinner
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
|
@ -148,7 +161,7 @@ do
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo " Patch..."
|
echo "\n Patch..."
|
||||||
# add -isysroot to CC=
|
# add -isysroot to CC=
|
||||||
if [[ "${PLATFORM}" == "AppleTVSimulator" || "${PLATFORM}" == "AppleTVOS" ]]; then
|
if [[ "${PLATFORM}" == "AppleTVSimulator" || "${PLATFORM}" == "AppleTVOS" ]]; then
|
||||||
sed -ie "s!^CFLAG=!CFLAG=-isysroot ${CROSS_TOP}/SDKs/${CROSS_SDK} -mtvos-version-min=${TVOS_MIN_SDK_VERSION} !" "Makefile"
|
sed -ie "s!^CFLAG=!CFLAG=-isysroot ${CROSS_TOP}/SDKs/${CROSS_SDK} -mtvos-version-min=${TVOS_MIN_SDK_VERSION} !" "Makefile"
|
||||||
|
@ -156,8 +169,7 @@ do
|
||||||
sed -ie "s!^CFLAG=!CFLAG=-isysroot ${CROSS_TOP}/SDKs/${CROSS_SDK} -miphoneos-version-min=${MIN_SDK_VERSION} !" "Makefile"
|
sed -ie "s!^CFLAG=!CFLAG=-isysroot ${CROSS_TOP}/SDKs/${CROSS_SDK} -miphoneos-version-min=${MIN_SDK_VERSION} !" "Makefile"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo " Make..."
|
echo " Make...\c"
|
||||||
echo " Please stand by..."
|
|
||||||
|
|
||||||
if [ "$1" == "verbose" ]; then
|
if [ "$1" == "verbose" ]; then
|
||||||
if [[ ! -z $CONFIG_OPTIONS ]]; then
|
if [[ ! -z $CONFIG_OPTIONS ]]; then
|
||||||
|
@ -168,8 +180,9 @@ do
|
||||||
if [[ ! -z $CONFIG_OPTIONS ]]; then
|
if [[ ! -z $CONFIG_OPTIONS ]]; then
|
||||||
make depend >> "${LOG}" 2>&1
|
make depend >> "${LOG}" 2>&1
|
||||||
fi
|
fi
|
||||||
make >> "${LOG}" 2>&1
|
(make >> "${LOG}" 2>&1) & spinner
|
||||||
fi
|
fi
|
||||||
|
echo "\n"
|
||||||
|
|
||||||
if [ $? != 0 ]; then
|
if [ $? != 0 ]; then
|
||||||
echo "Problem while make - Please check ${LOG}"
|
echo "Problem while make - Please check ${LOG}"
|
||||||
|
|
Loading…
Reference in New Issue