dotfiles/recipes/git

25 lines
459 B
Bash

#!/bin/bash
# Description: The Git version control system
set -e
case $_PLATFORM in
darwin)
_recipe brew
_brew git
;;
*)
_recipe _apt
_ppa git-core/ppa
_apt git
;;
esac
function _git {
local repo=$1
local dest=$2
if ! test -d "$dest"; then
_run "[git] Clone $repo to $dest" git clone --recursive $1 $2
else
echo "[git] $dest already exists, skipping."
fi
}