summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyle K <kylek389@gmail.com>2017-04-16 22:39:18 -0500
committerKyle K <kylek389@gmail.com>2017-04-16 22:39:18 -0500
commit4b3a82bb599b4d5be8557750fa96940187b3bc46 (patch)
tree306a2d6ded5d73c0d2f069700b6815bb2abe5a4c
parente50527a45f481661da466f4f0f3f744e941c5388 (diff)
downloadconfigs-4b3a82bb599b4d5be8557750fa96940187b3bc46.tar.gz
configs-4b3a82bb599b4d5be8557750fa96940187b3bc46.tar.bz2
configs-4b3a82bb599b4d5be8557750fa96940187b3bc46.zip
tweak macos clean script
-rw-r--r--macos/bash_profile7
-rwxr-xr-xmacos/clean.sh16
2 files changed, 20 insertions, 3 deletions
diff --git a/macos/bash_profile b/macos/bash_profile
new file mode 100644
index 0000000..7eb50b0
--- /dev/null
+++ b/macos/bash_profile
@@ -0,0 +1,7 @@
+if [[ $(id -u) -eq 0 ]]; then
+ PS1='\[\e[1;37m\][\[\e[m\]\[\e[1;31m\]\u\[\e[m\]@\[\e[1;37m\]\h\[\e[m\] \[\e[1;36m\]\w\[\e[m\]\[\e[1;37m\]]\[\e[m\]\[\e[1;32m\]\$\[\e[m\] \[\e[1;37m\]'
+else
+ PS1='\[\e[1;37m\][\[\e[m\]\[\e[1;32m\]\u\[\e[m\]@\[\e[1;37m\]\h\[\e[m\] \[\e[1;36m\]\w\[\e[m\]\[\e[1;33m\]$(__git_ps1 " (%s)")\[\e[m\]
+
+# aliases
+alias bb='history -c && history -w && rm -f ~/.bash_sessions/* && rm -f .bash_history && reset'
diff --git a/macos/clean.sh b/macos/clean.sh
index a50ee52..fe29bdf 100755
--- a/macos/clean.sh
+++ b/macos/clean.sh
@@ -1,9 +1,19 @@
#!/bin/bash
-sudo find /var/log/ -type f -exec rm -f {} \;
-sudo rm -f /Library/Logs/DiagnosticReports/*
-
rm -f ~/Library/Application Support/CrashReporter/*
+rm -rf ~/Library/Logs/DiagnosticReports/*
+rm -rf ~/Library/Logs/*
+
rm -f ~/.bash_sessions/*
+# probably good idea to have all apps closed and reboot once purged
+rm -rf ~/Library/Caches/*
+
+# per user cache files
+sudo rm -rf /var/folders/*
+sudo rm -rf /var/db/diagnostics/*
+
+sudo rm -rf /Library/Logs/*
+sudo find /var/log/ -type f -exec rm -f {} \;
+
exit 0