2017-12-05 22:39:10 -08:00
|
|
|
#!/usr/bin/env zsh
|
|
|
|
source ${0:A:h}/../../deploy
|
|
|
|
GIT_DIR="$XDG_CONFIG_HOME/git"
|
|
|
|
|
|
|
|
install() {
|
|
|
|
case $(_os) in
|
2018-05-08 07:26:02 -07:00
|
|
|
macos) brew install git git-lfs hub diff-so-fancy git-standup git-extras git-flow-avh ;;
|
|
|
|
arch)
|
2018-05-24 12:35:12 -07:00
|
|
|
yay --needed --noconfirm -S git hub \
|
2018-05-08 07:26:02 -07:00
|
|
|
git-lfs diff-so-fancy git-standup-git git-extras \
|
|
|
|
gitflow-avh ;;
|
2017-12-05 22:39:10 -08:00
|
|
|
debian)
|
2017-12-31 22:56:43 -08:00
|
|
|
sudo apt-get install -y git
|
|
|
|
# Install hub
|
|
|
|
if [[ ! -e $XDG_BIN_HOME/hub ]]; then
|
|
|
|
wget -O hub.tgz $(curl -s https://api.github.com/repos/github/hub/releases/latest | grep browser_download_url | cut -d '"' -f 4 | grep linux-amd64)
|
|
|
|
tar xzvf hub.tgz && cd hub-linux-*(/) && cp bin/hub $XDG_BIN_HOME/hub
|
2017-12-31 23:09:10 -08:00
|
|
|
wget -O $XDG_BIN_HOME/_hub https://raw.githubusercontent.com/github/hub/master/etc/hub.zsh_completion
|
2017-12-31 22:56:43 -08:00
|
|
|
fi
|
|
|
|
# Install diff-so-fancy
|
|
|
|
if [[ ! -e $XDG_BIN_HOME/diff-so-fancy ]]; then
|
|
|
|
wget -O $XDG_BIN_HOME/diff-so-fancy https://raw.githubusercontent.com/so-fancy/diff-so-fancy/master/third_party/build_fatpack/diff-so-fancy
|
|
|
|
chmod +x $XDG_BIN_HOME/diff-so-fancy
|
|
|
|
fi
|
|
|
|
# Install git-lfs
|
|
|
|
if ! command -v git-lfs >/dev/null; then
|
|
|
|
curl -s https://packagecloud.io/install/repositories/github/git-lfs/script.deb.sh | sudo bash
|
|
|
|
sudo apt-get install -y git-lfs && git lfs install
|
|
|
|
fi
|
2018-05-08 07:26:02 -07:00
|
|
|
sudo apt-get install git-flow
|
2017-12-05 22:39:10 -08:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
}
|
|
|
|
|
|
|
|
# update() {}
|
|
|
|
|
|
|
|
link() {
|
|
|
|
mklink {config,ignore} $GIT_DIR/
|
|
|
|
}
|
|
|
|
|
|
|
|
clean() {
|
|
|
|
rm -rfv $GIT_DIR
|
|
|
|
}
|
|
|
|
|
|
|
|
init "$@"
|