34 lines
870 B
Bash
34 lines
870 B
Bash
#!/bin/bash
|
|
|
|
function run_install {
|
|
|
|
mkdir -p $HOME/Library/Caches/Homebrew
|
|
rm -rf $HOME/Library/Caches/Homebrew/*
|
|
|
|
REPO="https://git.eeqj.de/sneak/osx.git"
|
|
DEST="$TMPDIR/osx"
|
|
|
|
if [[ ! -d "$DEST" ]]; then
|
|
git clone "$REPO" "$DEST"
|
|
else
|
|
cd "$DEST" && git pull && cd -
|
|
fi
|
|
|
|
rsync -avP "$DEST/custompkg/root/etc/skel/" "$HOME/"
|
|
mkdir -p $HOME/Library/bashrc.d
|
|
mkdir -p $HOME/Library/profile.d
|
|
touch $HOME/Library/bashrc.d/000keep.sh
|
|
touch $HOME/Library/profile.d/000keep.sh
|
|
|
|
# run modular setup scripts
|
|
for FN in $HOME/Library/user-setup/*.sh ; do
|
|
source $HOME/.bashrc
|
|
echo "new-user-setup: starting $(basename $FN)..."
|
|
bash "$FN" 2>&1 | tee -a $HOME/Library/Logs/user-setup.log
|
|
rm "$FN"
|
|
echo "new-user-setup: removed $(basename $FN)..."
|
|
done
|
|
}
|
|
|
|
run_install
|