Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
ncBash
/
mcBash
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit c3498165
authored
Mar 21, 2014
by
sn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
git funktion
1 parent
5bdadb10
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
0 deletions
Server/backupNctypo1ToLocal.sh
include.inc.sh
lib/fnc_mc_git.inc.sh
Server/backupNctypo1ToLocal.sh
0 → 100755
View file @
c349816
#!/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/
include.inc.sh
View file @
c349816
...
@@ -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"
lib/fnc_mc_git.inc.sh
0 → 100644
View file @
c349816
#!/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
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment