mirror of
https://github.com/correl/dotfiles.git
synced 2024-11-27 11:09:52 +00:00
25 lines
459 B
Bash
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
|
|
}
|