From bdb8ca26fbd815e16e6f3e31d5b584f514b92aed Mon Sep 17 00:00:00 2001 From: PeroSar Date: Tue, 10 May 2022 01:41:29 +0530 Subject: [PATCH] format shell scripts with shfmt shfmt -sr -w -ci bin/* *.sh Signed-off-by: PeroSar --- bin/aarch64-linux-android-ldd | 8 +++----- emerald-gcc.sh | 18 +++++++++--------- emerald-post-gcc-build.sh | 8 ++++---- 3 files changed, 16 insertions(+), 18 deletions(-) diff --git a/bin/aarch64-linux-android-ldd b/bin/aarch64-linux-android-ldd index dcd8ceb..60f9039 100755 --- a/bin/aarch64-linux-android-ldd +++ b/bin/aarch64-linux-android-ldd @@ -6,9 +6,7 @@ BIN_PATH=$(dirname "$(realpath "$0")") OBJDUMP="$BIN_PATH/aarch64-linux-android-objdump" case $# in - 0) echo "$USAGE" ;; - 1) $OBJDUMP -p -- "$@" | grep NEEDED | cut -d' ' -f18 ;; - *) $OBJDUMP -p -- "$@" | grep 'NEEDED\|file format' | cut -d' ' -f1,18 ;; + 0) echo "$USAGE" ;; + 1) $OBJDUMP -p -- "$@" | grep NEEDED | cut -d' ' -f18 ;; + *) $OBJDUMP -p -- "$@" | grep 'NEEDED\|file format' | cut -d' ' -f1,18 ;; esac - - diff --git a/emerald-gcc.sh b/emerald-gcc.sh index a2c57dc..191f22f 100755 --- a/emerald-gcc.sh +++ b/emerald-gcc.sh @@ -18,7 +18,7 @@ mkdir -vp "$EMERALD_BUILD_DIR" "$EMERALD_DL_DIR" download https://ftp.gnu.org/gnu/gcc/gcc-"$GCC_VER"/gcc-"$GCC_VER".tar.xz "$EMERALD_DL_DIR"/gcc-"$GCC_VER".tar.xz "$GCC_SHA256" if [ ! -d "$EMERALD_BUILD_DIR"/gcc-"$GCC_VER" ]; then - tar --directory="$EMERALD_BUILD_DIR" -xJf "$EMERALD_DL_DIR"/gcc-"$GCC_VER".tar.xz + tar --directory="$EMERALD_BUILD_DIR" -xJf "$EMERALD_DL_DIR"/gcc-"$GCC_VER".tar.xz fi cd "$EMERALD_BUILD_DIR"/gcc-"$GCC_VER" @@ -33,14 +33,14 @@ mkdir -vp build && cd "$_" # Configuration ../configure --target="$TARGET" --prefix="$PREFIX" \ - --enable-plugins --without-headers \ - --with-gnu-as --with-gnu-ld \ - --enable-languages=c,c++ --with-pkgversion='Emerald' \ - --enable-default-pie --enable-gnu-indirect-function \ - --disable-libsanitizer --disable-nls \ - --enable-threads=posix --enable-__cxa_atexit \ - --enable-clocale=gnu --disable-libstdcxx-pch \ - --with-bugurl='https://tildegit.org/PeroSar/emerald-gcc/issues' + --enable-plugins --without-headers \ + --with-gnu-as --with-gnu-ld \ + --enable-languages=c,c++ --with-pkgversion='Emerald' \ + --enable-default-pie --enable-gnu-indirect-function \ + --disable-libsanitizer --disable-nls \ + --enable-threads=posix --enable-__cxa_atexit \ + --enable-clocale=gnu --disable-libstdcxx-pch \ + --with-bugurl='https://tildegit.org/PeroSar/emerald-gcc/issues' # Building make -j4 diff --git a/emerald-post-gcc-build.sh b/emerald-post-gcc-build.sh index ff5d691..d4a5395 100755 --- a/emerald-post-gcc-build.sh +++ b/emerald-post-gcc-build.sh @@ -11,10 +11,10 @@ cd "$PREFIX" # Fix rust builds ( - cd lib/gcc/aarch64-linux-android/"$GCC_VER"/ - LIBGCC_FILENAME=libgcc_$(base64 <<< $RANDOM$RANDOM | sed 's|=||g').a - mv libgcc.a "$LIBGCC_FILENAME" - $AR crsT libgcc.a "$LIBGCC_FILENAME" libgcc_eh.a + cd lib/gcc/aarch64-linux-android/"$GCC_VER"/ + LIBGCC_FILENAME=libgcc_$(base64 <<< $RANDOM$RANDOM | sed 's|=||g').a + mv libgcc.a "$LIBGCC_FILENAME" + $AR crsT libgcc.a "$LIBGCC_FILENAME" libgcc_eh.a ) # Install helper scripts