From 70bb0fdb8f7c9f5c47baee636309641302d480cc Mon Sep 17 00:00:00 2001 From: Howard Wu <40033067+Howard20181@users.noreply.github.com> Date: Sun, 4 Sep 2022 00:43:31 +0800 Subject: [PATCH] Formatting codes --- README.md | 2 +- scripts/build.sh | 68 ++++++++++++++++++++++++------------------------ scripts/run.sh | 4 +-- 3 files changed, 37 insertions(+), 37 deletions(-) diff --git a/README.md b/README.md index 044a82c..b7f50cb 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ ## Pre-request - Ubuntu (you can use WSL2) - - [Search page](https://apps.microsoft.com/store/search?publisher=Canonical%20Group%20Limited) + - [Search page](https://apps.microsoft.com/store/search?publisher=Canonical%20Group%20Limited) ## Features diff --git a/scripts/build.sh b/scripts/build.sh index 78c44c1..7f05a31 100755 --- a/scripts/build.sh +++ b/scripts/build.sh @@ -18,7 +18,7 @@ # Copyright (C) 2022 LSPosed Contributors # -if [ ! "$BASH_VERSION" ] ; then +if [ ! "$BASH_VERSION" ]; then echo "Please do not use sh to run this script, just execute it directly" 1>&2 exit 1 fi @@ -34,7 +34,7 @@ DOWNLOAD_DIR=../download DOWNLOAD_CONF_NAME=download.list OUTPUT_DIR=../output MOUNT_DIR="$WORK_DIR"/system -umount_clean(){ +umount_clean() { if [ -d "$MOUNT_DIR" ]; then echo "Cleanup Work Directory" if [ -d "$MOUNT_DIR/vendor" ]; then @@ -52,7 +52,7 @@ umount_clean(){ rm -rf "${WORK_DIR:?}" fi } -clean_download(){ +clean_download() { if [ -d "$DOWNLOAD_DIR" ]; then echo "Cleanup Download Directory" if [ "$CLEAN_DOWNLOAD_WSA" ]; then @@ -77,11 +77,10 @@ abort() { trap abort INT TERM function Gen_Rand_Str { - tr -dc 'a-zA-Z0-9' < /dev/urandom | fold -w "$1" | head -n 1 + tr -dc 'a-zA-Z0-9' &2 exit 1 fi cd "$(dirname "$0")" || exit 1 -abort(){ +abort() { echo "Dependencies: an error has occurred, exit" exit 1 }