Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
dotfiles/installers/dot
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
50 lines (41 sloc)
986 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# dot | |
# https://github.com/holman/dotfiles/blob/master/bin/dot | |
# `dot` handles installation, updates, things like that. Run it periodically | |
# to make sure you're on the latest and greatest. | |
set -e | |
parentDirectory="$(cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd -P)" | |
dotfilesDirectory="$(cd "$( dirname "$parentDirectory" )" && pwd -P)" | |
displayUsageAndExit() { | |
echo "dot -- dotfiles management" | |
echo "" | |
echo "Usage: dot [options]" | |
echo "" | |
echo "Options:" | |
echo " -e, --edit Open dotfiles directory for editing" | |
echo " -h, --help Show this help message and exit" | |
exit | |
} | |
while test $# -gt 0; do | |
case "$1" in | |
"-h"|"--help") | |
displayUsageAndExit | |
;; | |
"-e"|"--edit") | |
exec "$EDITOR" "$dotfilesDirectory" | |
exit | |
;; | |
*) | |
echo "Invalid option: $1" | |
displayUsageAndExit | |
;; | |
esac | |
shift | |
done | |
export ZSH=$HOME/.dotfiles | |
# Set macOS defaults | |
$ZSH/macos/settings | |
# Set Xcode defaults | |
$ZSH/xcode/defaults | |
# Install homebrew | |
$ZSH/brew/install.sh |