[scripts,bash] reformat bash scripts

This commit is contained in:
akallabeth 2025-02-25 13:31:20 +01:00
parent 418d228d4b
commit 2adca10b3c
No known key found for this signature in database
GPG Key ID: A49454A3FC909FD5
19 changed files with 901 additions and 984 deletions

View File

@ -4,8 +4,7 @@ SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
MANIFEST=com.freerdp.FreeRDP
BUILD_BASE=$(mktemp -d)
if [ $# -gt 0 ];
then
if [ $# -gt 0 ]; then
BUILD_BASE=$1
fi
@ -15,15 +14,13 @@ BUILD=$BUILD_BASE/build
STATE=$BUILD_BASE/state
BUILDER=$(which flatpak-builder)
if [ ! -x "$BUILDER" ];
then
if [ ! -x "$BUILDER" ]; then
echo "command 'flatpak-builder' could not be found, please install and add to PATH"
exit 1
fi
FLATPAK=$(which flatpak)
if [ ! -x "$FLATPAK" ];
then
if [ ! -x "$FLATPAK" ]; then
echo "command 'flatpak' could not be found, please install and add to PATH"
exit 1
fi

View File

@ -1,19 +1,15 @@
#!/bin/sh
if [ -z ${FREERDP_SDL_OFF} ];
then
if [ -z ${FREERDP_SDL_OFF} ]; then
echo "SDL $(which sdl-freerdp)"
sdl-freerdp $@
exit $rc
else
if [ -z $XDG_SESSION_TYPE ];
then
if [ -z $XDG_SESSION_TYPE ]; then
echo "XDG_SESSION_TYPE undefined"
exit -1
elif [ "$XDG_SESSION_TYPE" = "wayland" ];
then
if [ -z $FREERDP_WAYLAND_OFF ];
then
elif [ "$XDG_SESSION_TYPE" = "wayland" ]; then
if [ -z $FREERDP_WAYLAND_OFF ]; then
echo "wayland $(which wlfreerdp)"
wlfreerdp $@
exit $rc
@ -22,8 +18,7 @@ else
xfreerdp $@
exit $rc
fi
elif [ "$XDG_SESSION_TYPE" = "x11" ];
then
elif [ "$XDG_SESSION_TYPE" = "x11" ]; then
echo "X11 $(which xfreerdp)"
xfreerdp $@
exit $rc

View File

@ -6,8 +6,7 @@ SCRIPT_PATH=$(realpath "$SCRIPT_PATH")
BUILD_DEPS=$(/usr/bin/which dpkg-checkbuilddeps)
BUILD_PKG=$(/usr/bin/which dpkg-buildpackage)
if [ -z "$BUILD_DEPS" ] || [ -z "$BUILD_PKG" ];
then
if [ -z "$BUILD_DEPS" ] || [ -z "$BUILD_PKG" ]; then
echo "dpkg-buildpackage [$BUILD_PKG] and dpkg-checkbuilddeps [$BUILD_DEPS] required"
echo "Install with 'sudo apt install dpkg-dev'"
exit 1

View File

@ -22,8 +22,7 @@ CMAKE_CMD_ARGS="-DANDROID_NDK=$ANDROID_NDK \
-DCMAKE_MAKE_PROGRAM=make"
BASE=$(pwd)
for ARCH in $BUILD_ARCH
do
for ARCH in $BUILD_ARCH; do
common_run cd $BASE
common_run mkdir -p $BUILD_SRC/cJSON-build/$ARCH
common_run cd $BUILD_SRC/cJSON-build/$ARCH

View File

@ -1,5 +1,6 @@
#!/bin/bash -x
SCRIPT_NAME="${BASH_SOURCE[0]}"
SCRIPT_PATH=$(dirname "${BASH_SOURCE[0]}")
SCRIPT_PATH=$(realpath "$SCRIPT_PATH")
@ -62,7 +63,7 @@ fi
CLEAN_BUILD_DIR=0
function common_help {
echo "$(BASHSOURCE[0]) supports the following arguments:"
echo "$SCRIPT_NAME supports the following arguments:"
echo " --ndk The base directory of your android NDK defa"
echo " ANDROID_NDK=$ANDROID_NDK"
echo " --sdk The base directory of your android SDK defa"
@ -88,57 +89,48 @@ function common_run {
echo "[RUN] $@"
"$@"
RES=$?
if [[ $RES -ne 0 ]];
then
if [[ $RES -ne 0 ]]; then
echo "[ERROR] $@ returned $RES"
exit 1
fi
}
function common_check_requirements {
if [[ ! -d $ANDROID_NDK ]];
then
if [[ ! -d $ANDROID_NDK ]]; then
echo "export ANDROID_NDK to point to your NDK location."
exit 1
fi
if [[ ! -d $ANDROID_SDK ]];
then
if [[ ! -d $ANDROID_SDK ]]; then
echo "export ANDROID_SDK to point to your SDK location."
exit 1
fi
if [[ -z $BUILD_DST ]];
then
if [[ -z $BUILD_DST ]]; then
echo "Destination directory not valid"
exit 1
fi
if [[ -z $BUILD_SRC ]];
then
if [[ -z $BUILD_SRC ]]; then
echo "Source directory not valid"
exit 1
fi
if [[ -z $SCM_URL ]];
then
if [[ -z $SCM_URL ]]; then
echo "Source URL not defined! Define SCM_URL"
exit 1
fi
if [[ -z $SCM_TAG ]];
then
if [[ -z $SCM_TAG ]]; then
echo "SCM_TAG / BRANCH not defined! Define SCM_TAG"
exit 1
fi
if [[ -z $SCM_HASH ]];
then
if [[ -z $SCM_HASH ]]; then
echo "SCM_HASH not defined! Define SCM_HASH"
exit 1
fi
if [[ -z $NDK_TARGET ]];
then
if [[ -z $NDK_TARGET ]]; then
echo "Android platform NDK_TARGET not defined"
exit 1
fi
@ -151,27 +143,23 @@ function common_check_requirements {
fi
fi
for CMD in make git $CMAKE_PROGRAM
do
for CMD in make git $CMAKE_PROGRAM; do
if ! type $CMD >/dev/null; then
echo "Command $CMD not found. Install and add it to the PATH."
exit 1
fi
done
if [ "${BUILD_SRC:0:1}" != "/" ];
then
if [ "${BUILD_SRC:0:1}" != "/" ]; then
BUILD_SRC=$(pwd)/$BUILD_SRC
fi
if [ "${BUILD_DST:0:1}" != "/" ];
then
if [ "${BUILD_DST:0:1}" != "/" ]; then
BUILD_DST=$(pwd)/$BUILD_DST
fi
}
function common_parse_arguments {
while [[ $# > 0 ]]
do
while [[ $# > 0 ]]; do
key="$1"
case $key in
--conf)
@ -244,8 +232,7 @@ function common_parse_arguments {
}
function common_update {
if [ $# -ne 4 ];
then
if [ $# -ne 4 ]; then
echo "Invalid arguments to update function $@"
exit 1
fi
@ -260,15 +247,12 @@ function common_update {
common_run mkdir -p $CACHE
TARFILE="$CACHE/$SCM_TAG.tar.gz"
if [[ ! -f "$TARFILE" ]];
then
if [[ ! -f "$TARFILE" ]]; then
WGET=$(which wget)
CURL=$(which curl)
if [ -x "$CURL" ];
then
if [ -x "$CURL" ]; then
common_run $CURL -L -o "$TARFILE" "$SCM_URL/$SCM_TAG.tar.gz"
elif [ -x "$WGET" ];
then
elif [ -x "$WGET" ]; then
common_run $WGET -O "$TARFILE" "$SCM_URL/$SCM_TAG.tar.gz"
else
echo "Neither wget nor curl installed, aborting"
@ -279,8 +263,7 @@ function common_update {
echo "$SCM_HASH $TARFILE" >$TARFILE.sha256sum
common_run sha256sum -c $TARFILE.sha256sum
if [[ -d $BUILD_SRC ]];
then
if [[ -d $BUILD_SRC ]]; then
common_run rm -rf $BUILD_SRC
fi
common_run mkdir -p $BUILD_SRC
@ -291,13 +274,11 @@ function common_update {
}
function common_clean {
if [ $CLEAN_BUILD_DIR -ne 1 ];
then
if [ $CLEAN_BUILD_DIR -ne 1 ]; then
return
fi
if [ $# -ne 1 ];
then
if [ $# -ne 1 ]; then
echo "Invalid arguments to clean function $@"
exit 1
fi
@ -307,24 +288,20 @@ function common_clean {
}
function common_copy {
if [ $# -ne 2 ];
then
if [ $# -ne 2 ]; then
echo "Invalid arguments to copy function $@"
exit 1
fi
if [ ! -d $1 ] || [ ! -d $1/include ] || [ ! -d $1/libs ];
then
if [ ! -d $1 ] || [ ! -d $1/include ] || [ ! -d $1/libs ]; then
echo "Invalid source $1"
exit 1
fi
if [ -z $2 ];
then
if [ -z $2 ]; then
echo "Invalid destination $2"
exit 1
fi
if [ ! -d $2 ];
then
if [ ! -d $2 ]; then
common_run mkdir -p $2
fi
common_run cp -L -r $1/include $2

View File

@ -178,15 +178,13 @@ function build {
common_parse_arguments $@
common_update $SCM_URL $SCM_TAG $BUILD_SRC $SCM_HASH
HOST_PKG_CONFIG_PATH=`command -v pkg-config`
HOST_PKG_CONFIG_PATH=$(command -v pkg-config)
if [ -z ${HOST_PKG_CONFIG_PATH} ]; then
echo "(*) pkg-config command not found\n"
exit 1
fi
for ARCH in $BUILD_ARCH
do
for ARCH in $BUILD_ARCH; do
case ${ARCH} in
armeabi-v7a)
TARGET_CPU="armv7-a"

View File

@ -28,8 +28,7 @@ source $SCRIPT_PATH/android-build.conf
# Parse arguments.
REMAINING=""
while [[ $# > 0 ]]
do
while [[ $# > 0 ]]; do
key="$1"
case $key in
--freerdp-src)
@ -81,20 +80,17 @@ do
done
common_parse_arguments $REMAINING
if [ -z ${WITH_MEDIACODEC+x} ];
then
if [ -z ${WITH_MEDIACODEC+x} ]; then
common_run echo "WITH_MEDIACODEC unset, defining WITH_MEDIACODEC=1"
WITH_MEDIACODEC=1
fi
# clean up top
if [ -d $BUILD_SRC ];
then
if [ -d $BUILD_SRC ]; then
common_clean $BUILD_SRC
fi
if [ -d $BUILD_DST ];
then
if [ -d $BUILD_DST ]; then
common_run mkdir -p $BUILD_DST
fi
@ -115,20 +111,16 @@ CMAKE_CMD_ARGS="-DANDROID_NDK=$ANDROID_NDK \
-DCMAKE_MAKE_PROGRAM=make"
BASE=$(pwd)
for ARCH in $BUILD_ARCH
do
for ARCH in $BUILD_ARCH; do
# build dependencies.
if [ $WITH_OPENH264 -ne 0 ];
then
if [ -z "$ANDROID_NDK_OPENH264" ]
then
if [ $WITH_OPENH264 -ne 0 ]; then
if [ -z "$ANDROID_NDK_OPENH264" ]; then
echo
echo "Warning: Missing openh264-ndk, using $ANDROID_NDK" >&2
echo
ANDROID_NDK_OPENH264=$ANDROID_NDK
fi
if [ $BUILD_DEPS -ne 0 ];
then
if [ $BUILD_DEPS -ne 0 ]; then
common_run bash $SCRIPT_PATH/android-build-openh264.sh \
--src $BUILD_SRC/openh264 --dst $BUILD_DST \
--sdk "$ANDROID_SDK" \
@ -143,17 +135,14 @@ do
CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DWITH_OPENH264=OFF"
fi
if [ $WITH_MEDIACODEC -ne 0 ];
then
if [ $WITH_MEDIACODEC -ne 0 ]; then
CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DWITH_MEDIACODEC=ON"
else
CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DWITH_MEDIACODEC=OFF"
fi
if [ $WITH_FFMPEG -ne 0 ];
then
if [ $BUILD_DEPS -ne 0 ];
then
if [ $WITH_FFMPEG -ne 0 ]; then
if [ $BUILD_DEPS -ne 0 ]; then
common_run bash $SCRIPT_PATH/android-build-ffmpeg.sh \
--src $BUILD_SRC/ffmpeg --dst $BUILD_DST \
--sdk "$ANDROID_SDK" \
@ -167,10 +156,8 @@ do
else
CMAKE_CMD_ARGS="$CMAKE_CMD_ARGS -DWITH_FFMPEG=OFF -DWITH_SWSCALE=OFF"
fi
if [ $WITH_AAD -ne 0 ];
then
if [ $BUILD_DEPS -ne 0 ];
then
if [ $WITH_AAD -ne 0 ]; then
if [ $BUILD_DEPS -ne 0 ]; then
common_run bash $SCRIPT_PATH/android-build-cjson.sh \
--src $BUILD_SRC/cjson --dst $BUILD_DST \
--sdk "$ANDROID_SDK" \
@ -181,10 +168,8 @@ do
--hash $CJSON_HASH
fi
fi
if [ $WITH_OPENSSL -ne 0 ];
then
if [ $BUILD_DEPS -ne 0 ];
then
if [ $WITH_OPENSSL -ne 0 ]; then
if [ $BUILD_DEPS -ne 0 ]; then
common_run bash $SCRIPT_PATH/android-build-openssl.sh \
--src $BUILD_SRC/openssl --dst $BUILD_DST \
--sdk "$ANDROID_SDK" \
@ -197,8 +182,7 @@ do
fi
# Build and install the library.
if [ $DEPS_ONLY -eq 0 ];
then
if [ $DEPS_ONLY -eq 0 ]; then
common_run cd $BASE
common_run mkdir -p $BUILD_SRC/freerdp-build/$ARCH
common_run cd $BUILD_SRC/freerdp-build/$ARCH

View File

@ -28,9 +28,7 @@ function build {
common_parse_arguments $@
common_update $SCM_URL $SCM_TAG $BUILD_SRC $SCM_HASH
for ARCH in $BUILD_ARCH
do
for ARCH in $BUILD_ARCH; do
case $ARCH in
"armeabi")
OARCH="arm"
@ -50,14 +48,12 @@ do
build $OARCH $NDK_TARGET
if [ ! -d $BUILD_DST/$ARCH/include ];
then
if [ ! -d $BUILD_DST/$ARCH/include ]; then
common_run mkdir -p $BUILD_DST/$ARCH/include
fi
common_run cp -L -r $BUILD_SRC/libs/$OARCH/include/ $BUILD_DST/$ARCH/
if [ ! -d $BUILD_DST/$ARCH ];
then
if [ ! -d $BUILD_DST/$ARCH ]; then
common_run mkdir -p $BUILD_DST/$ARCH
fi
common_run cp -L $BUILD_SRC/libs/$OARCH/lib/*.so $BUILD_DST/$ARCH/

View File

@ -9,8 +9,7 @@ COMPILER=4.9
source $(dirname "${BASH_SOURCE[0]}")/android-build-common.sh
function build {
if [ $# -ne 2 ];
then
if [ $# -ne 2 ]; then
echo "Invalid arguments $@"
exit 1
fi
@ -32,8 +31,7 @@ function build {
common_run ./Configure ${CONFIG} -D__ANDROID_API__=$NDK_TARGET
common_run make SHLIB_EXT=.so -j build_libs
if [ ! -d $DST_DIR ];
then
if [ ! -d $DST_DIR ]; then
common_run mkdir -p $DST_DIR
fi
@ -50,12 +48,12 @@ SCM_MOD_TAG=$SCM_TAG
case $SCM_TAG in OpenSSL_*)
SCM_MOD_TAG=${SCM_TAG//OpenSSL_/openssl-}
SCM_MOD_TAG=${SCM_MOD_TAG//_/.}
;;
esac
common_update "$SCM_URL/$SCM_TAG" $SCM_MOD_TAG $BUILD_SRC $SCM_HASH
ORG_PATH=$PATH
for ARCH in $BUILD_ARCH
do
for ARCH in $BUILD_ARCH; do
case $ARCH in
"armeabi-v7a")
@ -77,9 +75,7 @@ do
esac
done
if [ ! -d $BUILD_DST/$ARCH/include ];
then
if [ ! -d $BUILD_DST/$ARCH/include ]; then
common_run mkdir -p $BUILD_DST/$ARCH/include
fi
common_run cp -L -R $BUILD_SRC/include/openssl $BUILD_DST/$ARCH/include/

View File

@ -23,15 +23,13 @@ usage () {
}
check_tools() {
for TOOL in mkdir rm mv git dirname pwd find cut basename grep xargs cmake ninja autoconf automake aclocal autoheader glibtoolize lipo otool install_name_tool;
do
for TOOL in mkdir rm mv git dirname pwd find cut basename grep xargs cmake ninja autoconf automake aclocal autoheader glibtoolize lipo otool install_name_tool; do
set +e
TOOL_PATH=$(which "$TOOL")
set -e
echo "$TOOL: $TOOL_PATH"
if [ ! -f "$TOOL_PATH" ];
then
if [ ! -f "$TOOL_PATH" ]; then
echo "Missing $TOOL! please install and add to PATH."
exit 1
fi
@ -71,30 +69,24 @@ fix_rpath() {
SEARCH_PATH=$1
FIX_PATH=$1
EXT=".dylib"
if [ "$#" -gt 1 ];
then
if [ "$#" -gt 1 ]; then
FIX_PATH=$2
fi
if [ "$#" -gt 2 ];
then
if [ "$#" -gt 2 ]; then
EXT=$3
fi
# some build systems do not handle @rpath on mac os correctly.
# do check that and fix it.
DYLIB_ABS_NAMES=$(find $SEARCH_PATH -type f -name "*$EXT")
for DYLIB_ABS in $DYLIB_ABS_NAMES;
do
for DYLIB_ABS in $DYLIB_ABS_NAMES; do
DYLIB_NAME=$(basename $DYLIB_ABS)
install_name_tool -id @rpath/$DYLIB_NAME $DYLIB_ABS
for DYLIB_DEP in $(otool -L $DYLIB_ABS | grep "$FIX_PATH" | cut -d' ' -f1);
do
if [[ $DYLIB_DEP == $DYLIB_ABS ]];
then
for DYLIB_DEP in $(otool -L $DYLIB_ABS | grep "$FIX_PATH" | cut -d' ' -f1); do
if [[ $DYLIB_DEP == $DYLIB_ABS ]]; then
continue
elif [[ $DYLIB_DEP == $FIX_PATH/* ]];
then
elif [[ $DYLIB_DEP == $FIX_PATH/* ]]; then
DEP_BASE=$(basename $DYLIB_DEP)
install_name_tool -change $DYLIB_DEP @rpath/$DEP_BASE $DYLIB_ABS
fi
@ -104,8 +96,7 @@ fix_rpath() {
replace_rpath() {
FILE=$1
for PTH in $(otool -l $FILE | grep -A2 LC_RPATH | grep path | xargs -J ' ' | cut -d ' ' -f2);
do
for PTH in $(otool -l $FILE | grep -A2 LC_RPATH | grep path | xargs -J ' ' | cut -d ' ' -f2); do
install_name_tool -delete_rpath $PTH $FILE
done
install_name_tool -add_rpath @loader_path/../$LIBDIR $FILE
@ -113,8 +104,7 @@ replace_rpath() {
CMAKE_ARCHS=
OSSL_FLAGS="-mmacosx-version-min=$DEPLOYMENT_TARGET -I$INSTALL/include -L$INSTALL/lib"
for ARCH in $DEPLOYMENT_ARCH;
do
for ARCH in $DEPLOYMENT_ARCH; do
OSSL_FLAGS="$OSSL_FLAGS -arch $ARCH"
CMAKE_ARCHS="$ARCH;$CMAKE_ARCHS"
done
@ -140,8 +130,7 @@ CMAKE_ARGS="-DCMAKE_SKIP_INSTALL_ALL_DEPENDENCY=ON \
-DCMAKE_IGNORE_PREFIX_PATH='/opt/local;/usr/local;/opt/homebrew;/Library;~/Library'
"
if [ ! -d $SRC ];
then
if [ ! -d $SRC ]; then
mkdir -p $SRC
cd $SRC
git clone --depth 1 -b openssl-3.3.1 https://github.com/openssl/openssl.git
@ -162,13 +151,11 @@ then
./bootstrap
fi
if [ -d $INSTALL ];
then
if [ -d $INSTALL ]; then
rm -rf $INSTALL
fi
if [ -d $BUILD ];
then
if [ -d $BUILD ]; then
rm -rf $BUILD
fi
@ -237,8 +224,7 @@ meson setup --prefix="$INSTALL" -Doptimization=3 -Db_lto=true -Db_pie=true -Dc_a
-Dlibdir=lib openh264 $SRC/openh264
ninja -C openh264 install
for ARCH in $DEPLOYMENT_ARCH;
do
for ARCH in $DEPLOYMENT_ARCH; do
mkdir -p $BUILD/FFmpeg/$ARCH
cd $BUILD/FFmpeg/$ARCH
FFCFLAGS="-arch $ARCH -mmacosx-version-min=$DEPLOYMENT_TARGET"
@ -259,8 +245,7 @@ find lib -type l -exec cp -P {} $INSTALL/lib/ \;
BASE_LIBS=$(find lib -type f -name "*.dylib" -exec basename {} \;)
cd $BUILD/FFmpeg/install
for LIB in $BASE_LIBS;
do
for LIB in $BASE_LIBS; do
LIBS=$(find . -name $LIB)
lipo $LIBS -output $INSTALL/lib/$LIB -create
done
@ -301,13 +286,11 @@ mv lib $LIBDIR
mv bin $BINDIR
# update RPATH
for LIB in $(find $LIBDIR -type f -name "*.dylib");
do
for LIB in $(find $LIBDIR -type f -name "*.dylib"); do
replace_rpath $LIB
done
for BIN in $(find $BINDIR -type f);
do
for BIN in $(find $BINDIR -type f); do
replace_rpath $BIN
done

View File

@ -6,10 +6,8 @@ SRC_PATH="${SCRIPT_PATH}/.."
FORMAT_ARG="--check"
REST_ARGS=$@
if [ $# -ne 0 ]
then
if [ "$1" = "--help" ] || [ "$1" = "-h" ];
then
if [ $# -ne 0 ]; then
if [ "$1" = "--help" ] || [ "$1" = "-h" ]; then
echo "usage: $0 [options] [file, file, ...]"
echo "\t--check.-c ... run format check only, no files changed (default)"
echo "\t--format,-f ... format files in place"
@ -18,26 +16,22 @@ then
exit 1
fi
if [ "$1" = "--check" ] || [ "$1" = "-c" ];
then
if [ "$1" = "--check" ] || [ "$1" = "-c" ]; then
FORMAT_ARG="--check"
REST_ARGS="${@:2}"
fi
if [ "$1" = "--format" ] || [ "$1" = "-f" ];
then
if [ "$1" = "--format" ] || [ "$1" = "-f" ]; then
FORMAT_ARG="-i"
REST_ARGS="${@:2}"
fi
fi
if [ ! -n "$REST_ARGS" ];
then
if [ ! -n "$REST_ARGS" ]; then
CMAKE_FILES=$(find ${SRC_PATH} -name "*.cmake" -o -name "CMakeLists.txt")
CMAKE_CI_FILES=$(find ${SRC_PATH}/ci -name "*.txt")
fi
for FILE in $CMAKE_FILES $CMAKE_CI_FILES $REST_ARGS;
do
for FILE in $CMAKE_FILES $CMAKE_CI_FILES $REST_ARGS; do
echo "processing file $FILE..."
cmake-format -c "$SCRIPT_PATH/cmake-format.yml" $FORMAT_ARG $FILE
done

View File

@ -3,8 +3,7 @@
function run {
"$@"
RES=$?
if [[ $RES -ne 0 ]];
then
if [[ $RES -ne 0 ]]; then
echo "[ERROR] $@ returned $RES" >&2
exit 1
fi
@ -16,11 +15,13 @@ if [ -z ${TAG:-} ];then
echo "Is the TAG ${TAG} ok (YES|NO)?"
read answ
case "$answ" in
YES):
YES)
:
;;
*)
echo 'stopping here'
exit 1
;;
esac
fi
@ -60,8 +61,7 @@ create_hash ${ZIPNAME}
popd
# Sign the release tarballs
for EXT in tar.gz tar.bz2 tar.xz zip;
do
for EXT in tar.gz tar.bz2 tar.xz zip; do
run gpg --local-user 0xA49454A3FC909FD5 --sign --armor --output ${TMPDIR}/freerdp-${TAG}.${EXT}.asc --detach-sig ${TMPDIR}/freerdp-${TAG}.${EXT}
done
@ -70,8 +70,7 @@ run mv ${TMPDIR}/freerdp-${TAG}.zip* .
run rm -rf ${TMPDIR}
# Verify the release tarball signatures
for EXT in tar.gz tar.bz2 tar.xz zip;
do
for EXT in tar.gz tar.bz2 tar.xz zip; do
run gpg --verify freerdp-${TAG}.${EXT}.asc
done

View File

@ -32,8 +32,7 @@ if [ "$?" -ne 0 ]; then
exit
else
popd
while true
do
while true; do
echo -n "Compile FreeRDP? (y or n) - (y recommended for MacFreeRDP compilation):"
read CONFIRM
case $CONFIRM in
@ -41,30 +40,31 @@ else
pushd ./${XCODE_PROJ_DIR}
xcodebuild
popd
break ;;
break
;;
n | N | no | NO | No)
echo OK - you entered $CONFIRM
break
;;
*) echo Please enter only y or n
*) echo Please enter only y or n ;;
esac
done
echo "SUCCESS!"
while true
do
while true; do
echo -n "Open Xcode projects now? (y or n):"
read CONFIRM
case $CONFIRM in
y | Y | YES | yes | Yes)
open ${CLIENT_MAC_DIR}/${XCODE_PROJ_DIR}/MacFreeRDP.xcodeproj
open ./${XCODE_PROJ_DIR}/FreeRDP.xcodeproj
break ;;
break
;;
n | N | no | NO | No)
echo OK - $CONFIRM
break
;;
*) echo Please enter only y or n
*) echo Please enter only y or n ;;
esac
done