|
|
@ -15,10 +15,10 @@ export PATH=$PATH:/usr/local/sbin:/usr/sbin:/sbin:~/bin |
|
|
# Mise à jour automatique à partir du repo distant |
|
|
# Mise à jour automatique à partir du repo distant |
|
|
cd /home/$USER/rc |
|
|
cd /home/$USER/rc |
|
|
git fetch |
|
|
git fetch |
|
|
local gst=$(command git status --porcelain -b 2> /dev/null) |
|
|
git_st=$(command git status --porcelain -b 2> /dev/null) |
|
|
if $(echo "$gst" | grep '^## .*ahead' &> /dev/null); then |
|
|
if $(echo "$git_st" | grep '^## .*ahead' &> /dev/null); then |
|
|
echo"You have unpushed business in /home/$USER/rc" |
|
|
echo"You have unpushed business in /home/$USER/rc" |
|
|
elif $(echo "$gst" | grep '^## .*behind' &> /dev/null); then |
|
|
elif $(echo "$git_st" | grep '^## .*behind' &> /dev/null); then |
|
|
echo "Type Y to update .zshrc: \c" |
|
|
echo "Type Y to update .zshrc: \c" |
|
|
read line |
|
|
read line |
|
|
if [ "$line" = Y ] || [ "$line" = y ]; then |
|
|
if [ "$line" = Y ] || [ "$line" = y ]; then |
|
|
|