1
0
Fork 0

add new script to clean up unnecessary stuff in an archived osx homedir

Dieser Commit ist enthalten in:
Jeffrey Paul 2018-10-31 00:07:56 -07:00
Ursprung c9b8ecc8dc
Commit 21cc515b28
Signiert von: sneak
GPG-Schlüssel-ID: 052443F4DF2A55C2
1 geänderte Dateien mit 23 neuen und 0 gelöschten Zeilen

23
clean-old-osx-homedir/cleanhomedir Ausführbare Datei
Datei anzeigen

@ -0,0 +1,23 @@
#!/bin/bash
DIR="$1"
if [[ $# -ne 1 ]]; then
echo "usage: $0 <homedir>" > /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"