Skip to content

Commit

Permalink
Merge pull request #86 from AstroOrbis/main
Browse files Browse the repository at this point in the history
  • Loading branch information
fwartner authored Jul 25, 2021
2 parents c9db8f5 + 65b02e0 commit a5e5ba9
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,9 @@ A cleanup script for macOS that runs the following tasks:
* Remove PhpStorm logs
* Remove Minecraft logs and cache
* Remove Steam logs and cache
* Remove Lunar Client logs and cache
* Remove Wget logs and hosts
* Clear Bash/ZSH history

## Install Automatically

Expand Down
30 changes: 30 additions & 0 deletions mac-cleanup
Original file line number Diff line number Diff line change
Expand Up @@ -206,8 +206,38 @@ if [ -d ~/Library/Application\ Support/minecraft ]; then
rm -rfv ~/Library/Application\ Support/minecraft/webcache2 &>/dev/null
rm -rfv ~/Library/Application\ Support/minecraft/crash-reports &>/dev/null
rm -rfv ~/Library/Application\ Support/minecraft/*.log &>/dev/null
rm -rfv ~/Library/Application\ Support/minecraft/launcher_cef_log.txt &>/dev/null

if [ -d ~/Library/Application\ Support/minecraft/.mixin.out ]; then
rm -rfv ~/Library/Application\ Support/minecraft/.mixin.out &>/dev/null
fi
fi

# Deletes Lunar Client logs (Minecraft alternate client)
# -Astro
if [ -d ~/.lunarclient ]; then
msg 'Deleting Lunar Client logs and caches...'
rm -rfv ~/.lunarclient/game-cache &>/dev/null
rm -rfv ~/.lunarclient/launcher-cache &>/dev/null
rm -rfv ~/.lunarclient/logs &>/dev/null
rm -rfv ~/.lunarclient/offline/*/logs &>/dev/null
rm -rfv ~/.lunarclient/offline/files/*/logs &>/dev/null
fi

# Deletes Wget logs
# -Astro
if [ -d ~/wget-log ]; then
msg 'Deleting Wget log and hosts file...'
rm -fv ~/wget-log &>/dev/null
rm -fv ~/.wget-hsts &>/dev/null
fi

# Deletes Bash/ZSH logs
# -Astro
msg 'Clearing Bash/ZSH history...'
rm -fv ~/.bash_history &>/dev/null
rm -fv ~/.zhistory &>/dev/null

if type "brew" &>/dev/null; then
if [ "$update" = true ]; then
msg 'Updating Homebrew Recipes...'
Expand Down

0 comments on commit a5e5ba9

Please sign in to comment.