From 658f13d74aed0d7e6b509eebea2accfe2b0a2171 Mon Sep 17 00:00:00 2001 From: Hyperling Date: Thu, 9 Jan 2025 13:25:23 -0700 Subject: [PATCH] Add helper to clean up Code folder. --- tasks/general/acct_mgmt/users.yml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tasks/general/acct_mgmt/users.yml b/tasks/general/acct_mgmt/users.yml index 7320494..d8a3fd4 100644 --- a/tasks/general/acct_mgmt/users.yml +++ b/tasks/general/acct_mgmt/users.yml @@ -561,6 +561,17 @@ alias scan="nmap -A -p- --script=vuln" alias_prod: | alias prod="ssh -p {{ prod_port }} {{ prod_user }}@{{ prod_host }}" + function_clean_code: | + function clean-code { + echo -e "******* Android *******\n*** Build Caches ***" + find ~/Code/android-*/app -maxdepth 1 -type d -name "build" \ + -exec du -hs {} \; -exec rm -rf {} \; + echo -e "\n*** Gradle Caches ***" + find ~/Code/android-*/ -maxdepth 1 -type d -name ".gradle" \ + -exec du -hs {} \; -exec rm -rf {} \; + + echo -e "\n*** Done! ***" + } - name: General | Account Management | Users | Files | Common Variable set_fact: @@ -603,6 +614,7 @@ {{ source_docker_env }} {{ alias_scan }} {{ alias_prod }} + {{ function_clean_code }} - name: General | Account Management | Users | Files | .bashrc blockinfile: