Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install script #41

Closed
wants to merge 7 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions tools/instAll.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

install_scheme () {
# Parse the xml contained in the terminal profile, for preference data.
# Add the profile to the Terminal plist.
# Window Settings is a dictionary of installed terminal profiles.
XML=$(xmllint --xpath '/plist/dict' "$1")
NAME=$(echo $1 | awk '{split($0,a,"../schemes/"); print a[2]}'| sed -e 's/(//g' | sed -e 's/)//g' | cut -d'.' -f1)
defaults write com.apple.Terminal "Window Settings" -dict-add "$NAME" "$XML"
}


#loop through schemes
for scheme in ../schemes/*.terminal;
do
install_scheme "$scheme"
done