[F] Fix gradle detection
This commit is contained in:
+14
-9
@@ -112,17 +112,22 @@ alias ufw="sudo ufw"
|
|||||||
alias nginx="sudo nginx"
|
alias nginx="sudo nginx"
|
||||||
|
|
||||||
# Gradle with auto environment detection
|
# Gradle with auto environment detection
|
||||||
if command -v 'gradle' &> /dev/null; then
|
if [[ -z $GRADLE ]]; then
|
||||||
[[ -z $GRADLE ]] && GRADLE="$(which gradle)"
|
if command -v 'gradle' &> /dev/null; then
|
||||||
gradle() {
|
GRADLE="$(which gradle)"
|
||||||
if [[ -f "./gradlew" ]]; then
|
else
|
||||||
./gradlew "$@"
|
GRADLE="gradle"
|
||||||
else
|
fi
|
||||||
$GRADLE "$@"
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
gradle() {
|
||||||
|
if [[ -f "./gradlew" ]]; then
|
||||||
|
./gradlew "$@"
|
||||||
|
else
|
||||||
|
$GRADLE "$@"
|
||||||
|
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() {
|
||||||
sudo find . -type d -exec chmod 755 {} \;
|
sudo find . -type d -exec chmod 755 {} \;
|
||||||
|
|||||||
Reference in New Issue
Block a user