Created
September 13, 2022 10:16
-
-
Save herisulistiyanto/412d4f19e5f09a3c8cea55f505e84d6a to your computer and use it in GitHub Desktop.
Gradle Daemon Log Housekeeping
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# This script is used to clean up the log files in the Gradle Daemon directory. | |
# All of the *.out.log files will be removed | |
# Use it if you have storage space issue, caused of gradle daemon log | |
GRADLE_HOME=$HOME/.gradle | |
GRADLE_DAEMON_DIR=$GRADLE_HOME/daemon | |
if [ -d "$GRADLE_HOME" ]; then | |
if [ -d "$GRADLE_DAEMON_DIR" ]; then | |
find "$GRADLE_DAEMON_DIR" -type f -name "*.out.log" -exec rm -f {} \; | |
echo "Done Removing Gradle Daemon Log Files" | |
else | |
echo "$GRADLE_DAEMON_DIR does not exist" | |
fi | |
else | |
echo "$GRADLE_HOME does not exist" | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment