From 1c08ef474c79d4e7ca64ffd79c0d5d23310e4ed6 Mon Sep 17 00:00:00 2001 From: Hykilpikonna Date: Thu, 24 Nov 2022 01:10:35 -0500 Subject: [PATCH] [+] Gradle auto detection --- scripts/zshrc.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/zshrc.sh b/scripts/zshrc.sh index b4754e6..f3c54fe 100755 --- a/scripts/zshrc.sh +++ b/scripts/zshrc.sh @@ -97,6 +97,12 @@ compress-zst() { } alias tar-kill-progress="watch -n 60 killall tar -SIGUSR1" +# Gradle with auto environment detection +GRADLE="$(which gradle)" +gradle() { + [[ -f "./gradlew" ]] && ./gradlew "$@" || $GRADLE "$@" +} + # Unix permissions reset (Dangerous! This will make executable files no longer executable) reset-permissions-dangerous() { sudo find . -type d -exec chmod 755 {} \;