mirror of https://github.com/CGAL/cgal
* fix bug in testing option and YES/NO
* Add *.out and *.hlg as known files to remove * use bash instead of sh * make the script executable
This commit is contained in:
parent
0f009c297f
commit
60d13997b6
|
|
@ -1,4 +1,4 @@
|
||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
#
|
#
|
||||||
# usage: bash clean_up_branch.sh directory [rm]
|
# usage: bash clean_up_branch.sh directory [rm]
|
||||||
#
|
#
|
||||||
|
|
@ -16,17 +16,22 @@ fi
|
||||||
|
|
||||||
if [ ! -e $REPO_DIR/.svn/entries ]; then
|
if [ ! -e $REPO_DIR/.svn/entries ]; then
|
||||||
echo "$REPO_DIR is not a working copy"
|
echo "$REPO_DIR is not a working copy"
|
||||||
exit
|
exit 1
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
if [ $# -gt 1 -a "$2 == rm" ]; then
|
if [ $# -gt 1 ]; then
|
||||||
DELETE=1
|
if [ "$2" == "rm" ]; then
|
||||||
|
DELETE=1
|
||||||
|
else
|
||||||
|
echo "Unknown option $2"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
echo Cleaning $REPO_DIR
|
echo Cleaning $REPO_DIR
|
||||||
|
|
||||||
#define regular expression to match generated files
|
#define regular expression to match generated files
|
||||||
REGEXP='ProgramOutput\.|CMakeFiles|CMakeLists.txt|\.moc$|CMakeCache\.txt|error\.txt|cmake_install\.cmake|Makefile|doc_html|doc_pdf|\.pdflg$|\.ilg$|\.cgallog$|\.blg$|\.bak$|\.hax$|\.aux$|\.maf$|demo.*\/qrc_.*\.cxx|demo.*\/ui_.*\.h'
|
REGEXP='ProgramOutput\.|CMakeFiles|CMakeLists.txt|\.moc$|CMakeCache\.txt|error\.txt|cmake_install\.cmake|Makefile|doc_html|doc_pdf|\.pdflg$|\.ilg$|\.cgallog$|\.blg$|\.bak$|\.hax$|\.aux$|\.maf$|\.hlg$|\.out$|demo.*\/qrc_.*\.cxx|demo.*\/ui_.*\.h'
|
||||||
|
|
||||||
|
|
||||||
INITIAL=`svn status --no-ignore $1| awk '{if ($1 =="?" || $1=="I" ) print $2 }'`
|
INITIAL=`svn status --no-ignore $1| awk '{if ($1 =="?" || $1=="I" ) print $2 }'`
|
||||||
|
|
@ -68,7 +73,7 @@ if [ $DELETE -eq 1 ]; then
|
||||||
if [ "$EXECS" -o "$KNOWN" ]; then
|
if [ "$EXECS" -o "$KNOWN" ]; then
|
||||||
echo "Are you sure you want to execute the printed commands? [YES/NO]"
|
echo "Are you sure you want to execute the printed commands? [YES/NO]"
|
||||||
read ANSWER
|
read ANSWER
|
||||||
if [ "$ANSWER == YES" ]; then
|
if [ "$ANSWER" == "YES" ]; then
|
||||||
for i in $EXECS $KNOWN; do
|
for i in $EXECS $KNOWN; do
|
||||||
rm -rf $REPO_DIR/$i
|
rm -rf $REPO_DIR/$i
|
||||||
done
|
done
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue