Commit c3498165 by sn

git funktion

1 parent 5bdadb10
#!/bin/bash
#
# @package export_import
# @since 20131205 @author frederick@netz.coop
#
# stoesst export skripte auf dem Server an, kopiert zu lokal und installiert hier
#
. basepath.inc.sh
. "$__PATH_to_mcBash/include.inc.sh"
execute=1
#logfile="$__PATH_to_Log/ncExportMysql.log"
DATETIME=$(date +"%Y%m%d_%H%M%S")
#dir_backupServer="/home/backupServer/nctypo1_$DATETIME"
dir_backupServer="/home/backupServer/nctypo1"
#mc_bashsu "scp sn@144.76.125.173:/home/sn/temp $dir_backupServer " $execute $logfile
mc_bashsu "cd $dir_backupServer" $execute $logfile
mc_bashsu "$(for i in $(find *.tar.gz -type f); do tar -xzf $i; done)" $execute $logfile
mc_bashsu "$__PATH_to_mcBash/bin/ncImportMysql.sh" $execute $logfile
mc_bashsu "cd $__THIS_DIR" $execute $logfile
mc_bashsu "ln -s /home/backupServer/nctypo1/var/www/ /var/www/nctypo1" $execute $logfile
mkdir /var/www/nctypo1/netz-bb.netz.coop/tpyo3temp
chown -R www-data:www-data /var/www/nctypo1/git_checkout_TYPO_6-1/
chown -R www-data:www-data /var/www/nctypo1/netz-bb.netz.coop/
...@@ -13,3 +13,5 @@ __PATH_to_Log=$__PATH_to_mcBash'/log/' ...@@ -13,3 +13,5 @@ __PATH_to_Log=$__PATH_to_mcBash'/log/'
. "$__PATH_to_mcBash/fnc_mc_file.inc.sh" . "$__PATH_to_mcBash/fnc_mc_file.inc.sh"
. "$__PATH_to_mcBash/fnc_mc_dialog.inc.sh" . "$__PATH_to_mcBash/fnc_mc_dialog.inc.sh"
. "$__PATH_to_mcBash/lib/fnc_mc_parameter.inc.sh" . "$__PATH_to_mcBash/lib/fnc_mc_parameter.inc.sh"
. "$__PATH_to_mcBash/lib/fnc_mc_git.inc.sh"
#!/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
mc_bashsu "git branch | grep '*'" 1
git branch | grep '*' >> $logfile
mc_bashsu "git status -s" 1
mc_log "git status -s" $logfile
git status -s >> $logfile
mc_bashsu "git pull" 1
mc_bashsu "git log | grep -m 1 commit" 1
git log | grep -m 1 commit >> $logfile
mc_bashsu "git log | grep -m 1 Date" 1
git log | grep -m 1 Date >> $logfile
echo '----------------------------' >> $logfile
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!