-
Notifications
You must be signed in to change notification settings - Fork 0
/
cache-add-dir.sh
executable file
·31 lines (24 loc) · 1.36 KB
/
cache-add-dir.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#!/bin/bash
. ./shared_variables.sh
BISECT_DIR=$SRC_ROOT.cache
#BISECT_DIR=cache-bisect.dir
vers_fname="default_vers.txt"
PWD_=`pwd`
#BISECT_DIR=/var/cache/keytest/lyx-devel.cache
set -e
VER=`cd $SRC_ROOT && svn info | grep Revision: | sed s/Revision:.//`
echo .$VER.
if grep "^$VER$" $vers_fname
then
echo $VER already in $vers_fname
exit 0
fi
mkdir -p $BISECT_DIR/$VER/
echo RSYNCING
echo rsync -a --progress --exclude '*.o' --exclude '*.lo' --exclude '*.emergency' --exclude '#*#' --exclude '~' --exclude 'Makefile' --exclude 'moc_*' --exclude '*.pyc' --exclude '*.gmo' --exclude '*.Po' --exclude 'ui_*.h' --exclude '*.a' --exclude '*.1' --exclude 'autom4te*' --exclude 'aclocal.m4' $SRC_ROOT/* $SRC_ROOT/.svn $BISECT_DIR/$VER/
rsync -a --progress --exclude '*.o' --exclude '*.lo' --exclude '*.emergency' --exclude '#*#' --exclude '~' --exclude 'Makefile' --exclude 'moc_*' --exclude '*.pyc' --exclude '*.gmo' --exclude '*.Po' --exclude 'ui_*.h' --exclude '*.a' --exclude '*.1' --exclude 'autom4te*' --exclude 'aclocal.m4' $SRC_ROOT/* $SRC_ROOT/.svn $BISECT_DIR/$VER/ || true
echo RSYNC DONE
echo cd $BISECT_DIR/$VER/
(cd $BISECT_DIR/$VER/ && echo cd success && echo test "$PWD_" != `pwd` && [ "$PWD_" != "`pwd`" ] && echo dir is new && (svn diff . > autopatch.patch || echo made patch) && svn revert -R . echo reverted) && echo $VER >> $vers_fname
echo REVERT DONE
exit 0