fnc_mc_git.inc.sh
588 Bytes
#!/bin/bash
#
# @param string $1 git dir
# @param string $2 logfile (FILE exists and is writable)
#
mc_git_pull() {
gitdir=$1
logfile=$2
echo ''
echo '' >> $logfile
mc_log "git pull $gitdir" $logfile
mc_bashsu "cd $gitdir" 1
git branch | grep '*'
git branch | grep '*' >> $logfile
git status -s
mc_log "git status -s" $logfile
git status -s >> $logfile
git pull
#mc_bashsu "git log | grep -m 1 commit" 1
git log | grep -m 1 commit >> $logfile
git log | grep -m 1 Date
git log | grep -m 1 Date >> $logfile
echo '----------------------------' >> $logfile
}