2020-03-30 08:24:49 +00:00
|
|
|
#!/bin/bash
|
|
|
|
case $1 in
|
|
|
|
check_error)
|
|
|
|
result="$(/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME status --short 2> /dev/null)"
|
|
|
|
if [[ $? -ne 0 ]]; then
|
|
|
|
echo YES
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
check_status)
|
|
|
|
result="$(/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME status --short 2> /dev/null)"
|
|
|
|
if [[ ! -z "$result" ]]; then
|
|
|
|
echo YES
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
check_push)
|
|
|
|
result="$(/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME status --short 2> /dev/null)"
|
|
|
|
if [[ -z "$result" ]]; then
|
2020-08-11 06:20:07 +00:00
|
|
|
result="$(/usr/bin/git --git-dir=$HOME/.dotfiles --work-tree=$HOME cherry -v )"
|
2020-03-30 08:24:49 +00:00
|
|
|
if [[ ! -z "$result" ]]; then
|
|
|
|
echo YES
|
|
|
|
fi
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
esac
|
|
|
|
|