From 7a59b3b9b773924ef51e27834e48cb1036020c07 Mon Sep 17 00:00:00 2001 From: stceum <50257864+stceum@users.noreply.github.com> Date: Fri, 3 Jan 2025 15:06:19 +0800 Subject: [PATCH 1/3] Fixup the bug that when the winapps-src is cloned but $INQUIRER is not updated with cloned path causing the failure of running the script. --- setup.sh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index 885b321..b0b4667 100755 --- a/setup.sh +++ b/setup.sh @@ -188,8 +188,12 @@ function waGetSourceCode() { function waGetInquirer() { local INQUIRER=$INQUIRER_PATH - if [ ! -d "$SYS_SOURCE_PATH" ] && [ ! -d "$USER_SOURCE_PATH" ]; then - INQUIRER="/tmp/waInquirer.sh" + if [ -d "$SYS_SOURCE_PATH" ]; then + INQUIRER=$SYS_SOURCE_PATH/$INQUIRER_PATH + elif [ -d "$USER_SOURCE_PATH" ] ; then + INQUIRER=$USER_SOURCE_PATH/$INQUIRER_PATH + else + INQUIRER="/tmp/waInquirer.sh" rm -f "$INQUIRER" curl -o "$INQUIRER" "https://raw.githubusercontent.com/winapps-org/winapps/main/install/inquirer.sh" From b76598b3bb296e5a68e2dbb76fb3b48b59db0f64 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Fri, 3 Jan 2025 07:13:36 +0000 Subject: [PATCH 2/3] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index b0b4667..78dde91 100755 --- a/setup.sh +++ b/setup.sh @@ -189,11 +189,11 @@ function waGetInquirer() { local INQUIRER=$INQUIRER_PATH if [ -d "$SYS_SOURCE_PATH" ]; then - INQUIRER=$SYS_SOURCE_PATH/$INQUIRER_PATH + INQUIRER=$SYS_SOURCE_PATH/$INQUIRER_PATH elif [ -d "$USER_SOURCE_PATH" ] ; then - INQUIRER=$USER_SOURCE_PATH/$INQUIRER_PATH + INQUIRER=$USER_SOURCE_PATH/$INQUIRER_PATH else - INQUIRER="/tmp/waInquirer.sh" + INQUIRER="/tmp/waInquirer.sh" rm -f "$INQUIRER" curl -o "$INQUIRER" "https://raw.githubusercontent.com/winapps-org/winapps/main/install/inquirer.sh" From 03c702a662e1040444860b5f4d864edc96e8aaf5 Mon Sep 17 00:00:00 2001 From: Oskar Manhart <52569953+oskardotglobal@users.noreply.github.com> Date: Fri, 3 Jan 2025 11:16:46 +0100 Subject: [PATCH 3/3] fmt: reindent file --- setup.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/setup.sh b/setup.sh index 78dde91..8c6209f 100755 --- a/setup.sh +++ b/setup.sh @@ -189,11 +189,11 @@ function waGetInquirer() { local INQUIRER=$INQUIRER_PATH if [ -d "$SYS_SOURCE_PATH" ]; then - INQUIRER=$SYS_SOURCE_PATH/$INQUIRER_PATH + INQUIRER=$SYS_SOURCE_PATH/$INQUIRER_PATH elif [ -d "$USER_SOURCE_PATH" ] ; then - INQUIRER=$USER_SOURCE_PATH/$INQUIRER_PATH + INQUIRER=$USER_SOURCE_PATH/$INQUIRER_PATH else - INQUIRER="/tmp/waInquirer.sh" + INQUIRER="/tmp/waInquirer.sh" rm -f "$INQUIRER" curl -o "$INQUIRER" "https://raw.githubusercontent.com/winapps-org/winapps/main/install/inquirer.sh"