From 21cc515b28e6fb5b0e7eae7363cfb8092ca9885b Mon Sep 17 00:00:00 2001 From: Jeffrey Paul Date: Wed, 31 Oct 2018 00:07:56 -0700 Subject: [PATCH] add new script to clean up unnecessary stuff in an archived osx homedir --- clean-old-osx-homedir/cleanhomedir | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100755 clean-old-osx-homedir/cleanhomedir diff --git a/clean-old-osx-homedir/cleanhomedir b/clean-old-osx-homedir/cleanhomedir new file mode 100755 index 0000000..8f854a7 --- /dev/null +++ b/clean-old-osx-homedir/cleanhomedir @@ -0,0 +1,23 @@ +#!/bin/bash + +DIR="$1" + +if [[ $# -ne 1 ]]; then + echo "usage: $0 " > /dev/stderr + exit 1 +fi + +ABS="$(cd $DIR && pwd -P)" + +if [[ ! -d "$ABS/Library" ]]; then + echo "Could not find an osx homedir at path $ABS" >> /dev/stderr + exit 1 +fi + +RM="echo rm" + +$RM "$ABS/Library/Application Support/Adobe" +$RM "$ABS/Library/Application Support/Slack" +$RM "$ABS/Library/Screen Savers" +$RM "$ABS/Library/Containers/com.apple.appstore" +$RM "$ABS/Library/Containers/com.apple.Photos"