dotfiles/recipes/git

26 lines
459 B
Text
Raw Normal View History

2018-02-22 04:15:49 +00:00
#!/bin/bash
2018-04-12 18:07:33 +00:00
# Description: The Git version control system
2018-02-27 05:15:14 +00:00
set -e
2018-02-22 04:15:49 +00:00
2018-02-23 22:04:15 +00:00
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
}