osx/install.sh

33 lines
852 B
Bash
Raw Normal View History

2019-11-27 04:28:59 +00:00
#!/bin/bash
function run_install {
2019-11-27 04:43:36 +00:00
mkdir -p $HOME/Library/Caches/Homebrew
rm -rf $HOME/Library/Caches/Homebrew/*
2020-02-19 23:24:40 +00:00
REPO="https://git.eeqj.de/sneak/osx.git"
DEST="$TMPDIR/osx"
2019-11-27 04:28:59 +00:00
if [[ ! -d "$DEST" ]]; then
git clone "$REPO" "$DEST"
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
2019-11-27 04:28:59 +00:00
# run modular setup scripts
for FN in $HOME/Library/user-setup/*.sh ; do
source $HOME/.profile
source $HOME/.bashrc
2019-11-27 04:28:59 +00:00
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