mirror of
https://github.com/winapps-org/winapps.git
synced 2025-06-06 07:07:18 +02:00
fix: load inquirer even if repo isn't cloned yet
This commit is contained in:
parent
95ba3209c9
commit
4e0d582101
21
setup.sh
21
setup.sh
@ -182,6 +182,18 @@ function waGetSourceCode() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Name: 'waGetInquirer'
|
||||||
|
# Role: Loads the inquirer script, even if the source isn't cloned yet
|
||||||
|
function waGetInquirer() {
|
||||||
|
if [[ ! -d "$SYS_SOURCE_PATH" || ! -d "$USER_SOURCE_PATH" ]]; then
|
||||||
|
INQUIRER_PATH="/tmp/waInquirer.sh"
|
||||||
|
curl "https://raw.githubusercontent.com/winapps-org/winapps/main/install/inquirer.sh" -O "$INQUIRER_PATH"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# shellcheck source=/dev/null # Exclude this file from being checked by ShellCheck.
|
||||||
|
source "$INQUIRER_PATH"
|
||||||
|
}
|
||||||
|
|
||||||
# Name: 'waCheckInput'
|
# Name: 'waCheckInput'
|
||||||
# Role: Sanitises input and guides users through selecting appropriate options if no arguments are provided.
|
# Role: Sanitises input and guides users through selecting appropriate options if no arguments are provided.
|
||||||
function waCheckInput() {
|
function waCheckInput() {
|
||||||
@ -1731,12 +1743,8 @@ ${CLEAR_TEXT}"
|
|||||||
# Check dependencies for the script.
|
# Check dependencies for the script.
|
||||||
waCheckScriptDependencies
|
waCheckScriptDependencies
|
||||||
|
|
||||||
# Get the source code
|
|
||||||
waGetSourceCode
|
|
||||||
|
|
||||||
# Source the contents of 'inquirer.sh'.
|
# Source the contents of 'inquirer.sh'.
|
||||||
# shellcheck source=/dev/null # Exclude this file from being checked by ShellCheck.
|
waGetInquirer
|
||||||
source "$INQUIRER_PATH"
|
|
||||||
|
|
||||||
# Sanitise and parse the user input.
|
# Sanitise and parse the user input.
|
||||||
waCheckInput "$@"
|
waCheckInput "$@"
|
||||||
@ -1744,6 +1752,9 @@ waCheckInput "$@"
|
|||||||
# Configure paths and permissions.
|
# Configure paths and permissions.
|
||||||
waConfigurePathsAndPermissions
|
waConfigurePathsAndPermissions
|
||||||
|
|
||||||
|
# Get the source code
|
||||||
|
waGetSourceCode
|
||||||
|
|
||||||
# Install or uninstall WinApps.
|
# Install or uninstall WinApps.
|
||||||
if [ "$OPT_UNINSTALL" -eq 1 ]; then
|
if [ "$OPT_UNINSTALL" -eq 1 ]; then
|
||||||
waUninstall
|
waUninstall
|
||||||
|
Loading…
x
Reference in New Issue
Block a user