[F] Fix gradle detection

This commit is contained in:
Azalea Gui
2023-04-07 18:30:02 -04:00
parent 2e1ba2c5a9
commit cbbaa28280
+10 -8
View File
@@ -112,14 +112,16 @@ alias ufw="sudo ufw"
alias nginx="sudo nginx" alias nginx="sudo nginx"
# Gradle with auto environment detection # Gradle with auto environment detection
[[ -z $GRADLE ]] && GRADLE="$(which gradle)" if command -v 'gradle' &> /dev/null; then
gradle() { [[ -z $GRADLE ]] && GRADLE="$(which gradle)"
if [[ -f "./gradlew" ]]; then gradle() {
./gradlew "$@" if [[ -f "./gradlew" ]]; then
else ./gradlew "$@"
$GRADLE "$@" else
fi $GRADLE "$@"
} fi
}
fi
# Unix permissions reset (Dangerous! This will make executable files no longer executable) # Unix permissions reset (Dangerous! This will make executable files no longer executable)
reset-permissions-dangerous() { reset-permissions-dangerous() {