-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Home
Dan Croak edited this page Apr 24, 2017
·
4 revisions
Put your personal customizations in ~/.laptop.local
.
Write your customizations such that they can be run safely more than once.
brew_install_or_upgrade
, fancy_echo
and other functions from
mac
are available for use in ~/.laptop.local.
Below are some example functions written by the community.
git_clone_or_pull() {
local REPOSRC=$1
local LOCALREPO=$2
local LOCALREPO_VC_DIR=$LOCALREPO/.git
if [[ ! -d "$LOCALREPO_VC_DIR" ]]; then
git clone --recursive $REPOSRC $LOCALREPO
else
pushd $LOCALREPO
git pull $REPOSRC && git submodule update --init --recursive
popd
fi
}