Skip to content
Snippets Groups Projects
Commit bc371eea authored by sauloal's avatar sauloal
Browse files

2012-03-02_00_22_39_01_00 :: 1 :: M => 1

parent 3a2cb335
No related branches found
No related tags found
No related merge requests found
#!/bin/bash
cd ~
cd /home/aflit001/git/
./commitRepos.sh
DATESTR=`date --rfc-3339=seconds | tr " |,|:|\+" _`
LOG=~/tmp/git_$DATESTR.log
git add -v .gitignore 2>&1 | tee -a $LOG
git add -v .gitconfig 2>&1 | tee -a $LOG
git add -v .bashrc 2>&1 | tee -a $LOG
git add -v .htoprc 2>&1 | tee -a $LOG
#git add -v .cpan 2>&1 | tee -a $LOG
#git add -v .cpanm 2>&1 | tee -a $LOG
git add -v .profile 2>&1 | tee -a $LOG
git add -v .vnc 2>&1 | tee -a $LOG
git add -v .ssh 2>&1 | tee -a $LOG
git add -v .connectprofiles 2>&1 | tee -a $LOG
git add -v .htoprc 2>&1 | tee -a $LOG
git add -v .local 2>&1 | tee -a $LOG
git add -v .selected_editor 2>&1 | tee -a $LOG
git add -v bin 2>&1 | tee -a $LOG
#git add -v code 2>&1 | tee -a $LOG
git add -v cyrille2 2>&1 | tee -a $LOG
git add -v lib 2>&1 | tee -a $LOG
git add -v filter 2>&1 | tee -a $LOG
git add -v temptive 2>&1 | tee -a $LOG
git add -v public_html/ 2>&1 | tee -a $LOG
git add -v public_html_acessories/ 2>&1 | tee -a $LOG
git add -v R 2>&1 | tee -a $LOG
git add -v share 2>&1 | tee -a $LOG
git add -v usr 2>&1 | tee -a $LOG
git add -v var 2>&1 | tee -a $LOG
git add -v include 2>&1 | tee -a $LOG
git status 2>&1 | tee -a $LOG
STATUSN=`git status -s | grep -v \?\? | wc -l`
STATUSN=$((STATUSN-1))
STATUST=`git status -s | grep -v \?\? | perl -MFile::Basename -ane 'BEGIN { %p } END { map { my $k = $_; print $k, " => ", (scalar keys %{$p{$k}}), "\n"; } sort keys %p; } $d=dirname $F[1]; $p{$F[0]}{$d}++;'`
STATUSL=`git status -s | grep -v \?\? | perl -MFile::Basename -ane 'BEGIN { %p } END { map { my $k = $_; print $k, " => ", (scalar keys %{$p{$k}}), "\n"; } sort keys %p; foreach my $k (sort keys %p) { foreach my $kk ( sort keys %{$p{$k}} ) { print "\t$kk => $p{$k}{$kk}\n"; } } } $d=dirname $F[1]; $p{$F[0]}{$d}++;'`
if [[ ! -z $(git ls-files --deleted) ]]; then
git rm $(git ls-files --deleted) 2>&1 | tee -a $LOG
fi
echo "STATUS $STATUS ($STATUSN)"
echo "STATUS $STATUS ($STATUST)"
git commit -m "$DATESTR :: $STATUSN :: $STATUST" 2>&1 | tee -a $LOG
cd -
......@@ -9,34 +9,23 @@ JGITCFG=$FOLDER/.jgit_s3_private
BUCKET=saulo.git
JGITBIN=$FOLDER/bin/jgit
DATESTR=`date --rfc-3339=seconds | tr " |,|:|\+" _`
LOG=$FOLDER/tmp/git_$NAME\_$DATESTR.log
LOG=$HOME/tmp/git_$NAME\_$DATESTR.log
echo " MACHINE $MACHINE"
echo " NAME $NAME"
cd $FOLDER
touch $LOG
#git add .gitignore 2>&1 | tee -a $LOG
#git add . -v 2>&1 | tee -a $LOG
git status 2>&1 | tee -a $LOG
#git commit -m "$DATESTR" 2>&1 | tee -a $LOG
cd /home/aflit001/git/
gitClean . 2>&1 | tee -a $LOG
./commitRepos.sh 2>&1 | tee -a $LOG
git config --global pack.window 25M 2>&1 | tee -a $LOG
git config --global pack.windowMemory 25M 2>&1 | tee -a $LOG
git config --global pack.compression 1 2>&1 | tee -a $LOG
git config --global pack.packSizeLimit 25M 2>&1 | tee -a $LOG
git config --global pack.deltaCacheSize 25M 2>&1 | tee -a $LOG
git config --global pack.deltaCacheLimit 25M 2>&1 | tee -a $LOG
#git gc
git remote add s3_$NAME amazon-s3://$JGITCFG@$BUCKET/$MACHINE\_$NAME.git 2>&1 > /dev/null
source $HOME/bin/secretLoad
source $HOME/bin/secretLoad 2>&1 | tee -a $LOG
echo "accesskey:$AWS_ACCESS_KEY_ID
secretkey:$AWS_SECRET_ACCESS_KEY
......@@ -48,7 +37,6 @@ source $HOME/bin/secretUnLoad
$JGITBIN push s3_$NAME 2>&1 | tee -a $LOG
rm $HOME/.jgit_s3_private
rm $HOME/.jgit_s3_private 2>&1 | tee -a $LOG
cd - 2>&1 | tee -a $LOG
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment