WizardKit/setup/macos-live/update-base-image
2021-03-13 04:21:37 -07:00

45 lines
1.6 KiB
Bash
Executable file

#!/bin/bash
#
## Update BaseImage for use as WK
set -o errexit
set -o errtrace
set -o nounset
set -o pipefail
WK_DEV="$1"
# BaseSystem
rm -Rv "${WK_DEV}"/Install*.app
cp -av Utilities.plist "${WK_DEV}/System/Installation/CDIS/OS X Utilities.app/Contents/Resources/Utilities.plist"
# 1201 CA
cp -av ../windows/bin/1201_Root_CA.crt "${WK_DEV}/.1201_Root_CA.crt"
# Homebrew
mkdir -p "${WK_DEV}/usr/local/bin"
ln -s python3 "${WK_DEV}/usr/local/bin/python"
rsync -ahvPS /opt/ "${WK_DEV}/opt"/
rsync -ahvPS /usr/local/{Cellar,Frameworks,Homebrew,bin,etc,include,lib,libexec,opt,sbin,share,var} "${WK_DEV}/usr/local/"
# Fonts
cp -av /Library/Fonts/Inconsolata*ttf "${WK_DEV}/System/Library/Fonts/"
# iTerm2
cp -av ../linux/include/airootfs/etc/skel/.tmux.conf "${WK_DEV}/etc/tmux.conf"
rsync -ahvPS /Applications/iTerm.app "${WK_DEV}/Applications"/
rsync -ahvPS /System/Library/Colors/System.clr "${WK_DEV}/System/Library/Colors"/
rsync -ahvPS /System/Library/Frameworks/{Scripting,ScriptingBridge,LocalAuthentication}.framework "${WK_DEV}/System/Library/Frameworks"/
rsync -ahvPS /usr/bin/locale "${WK_DEV}/usr/bin"/
rsync -ahvLPS /usr/share/locale/en_US.UTF-8 "${WK_DEV}/usr/share/locale"/
rsync -ahvPS com.googlecode.iterm2.plist "${WK_DEV}/var/root/Library/Preferences"/
# pipes-sh
cp -av /usr/bin/tput "${WK_DEV}/usr/bin"/
# WizardKit
touch "${WK_DEV}/.wk-live-macos"
ln -s /Volumes/RAM_Disk/Logs "${WK_DEV}/var/root/Logs"
cp -av ../../images/macOS.png "${WK_DEV}/usr/local/wallpaper.png"
rsync -ahvPS /usr/bin/{env,killall} "${WK_DEV}/usr/bin"/
rsync -ahvPS live-macos-startup ../../scripts/ "${WK_DEV}/usr/local/bin"/