source: branches/profile/SOURCE_TOOLS/arb_create_patch.sh

Last change on this file was 11401, checked in by westram, 10 years ago
  • reintegrates 'tree' into 'trunk':
    • consensus trees:
      • support for merging partial trees ("worked" before, but results were crap; implements #65)
      • generated trees are automatically re-rooted and -ordered
      • always list source trees in consensus-tree-comment; show info about partial trees
      • fixed progress bar
    • made GBT_TREE a base class of other tree classes (implements #31)
    • save tree properties in properties (not in DB)
    • new functions 'Remove zombies/marked from ALL trees'
    • tree load/save: layout fixes
    • unit tests
      • added tests for basic tree modifications (PARSIMONY)
    • performance:
      • compute_tree updates tree information in one traversal
      • tree generators are now capable to generate any type of tree (w/o needing to copy it once)
    • bugfixes:
      • NNI (of marked species) was also always performed for colored species
      • centered beautify-order is stable now
      • improved 'search optimal root'
  • adds:
  • Property svn:executable set to *
File size: 2.4 KB
Line 
1#!/bin/bash -x
2
3NAME=$1
4if [ -z "$NAME" ]; then
5    echo "Usage: arb_create_patch.sh name"
6    false
7else
8    if [ ! -d "$ARBHOME" ]; then
9        echo "No patch created (ARBHOME undefined)"
10    else
11        if [ ! -d $ARBHOME/.svn ]; then
12            echo "No patch created (no SVN checkout in ARBHOME)"
13        else
14            cd $ARBHOME
15            PATCHDIR=./patches.arb
16            mkdir -p $PATCHDIR
17            DATE=`date '+%Y%m%d_%H%M%S'`
18            PATCHNAME=${NAME}_$DATE
19            PATCH=$PATCHDIR/$PATCHNAME.patch
20            FAKEPATCH=$PATCHDIR/fake.patch
21            RECENT_PATCH=./latest.patch
22            INTERDIFF_PATCH=./interdiff.patch
23            IGNORE_WHITE_PATCH=./latest_iwhite.patch
24            WHITE_PATCH=./white.patch
25
26            svn diff > $PATCH
27           
28            if [ -e $PATCH ]; then
29                if [ ! -s $PATCH ]; then
30                    rm $PATCH
31                    if [ ! -e $FAKEPATCH ]; then
32                        echo "Index: No changes" > $FAKEPATCH
33                        echo "===================================================================" >> $FAKEPATCH
34                    fi
35                    ln --force $FAKEPATCH $RECENT_PATCH
36                    touch $FAKEPATCH
37                    rm -f $INTERDIFF_PATCH $IGNORE_WHITE_PATCH $WHITE_PATCH
38                    echo "No patch generated (no diff)"
39                else
40                    DIFF=1
41                    INTER=0
42                    if [ -e $RECENT_PATCH ]; then
43                        DIFF=`diff $PATCH $RECENT_PATCH | wc -l`
44                        INTER=DIFF
45                    fi
46
47                    if [ $DIFF = 0 ]; then
48                        echo "No patch generated (same as last patch)"
49                        rm $PATCH
50                        rm -f $INTERDIFF_PATCH
51                    else
52                        (   svn diff -x -b > $IGNORE_WHITE_PATCH ; \
53                            interdiff $PATCH $IGNORE_WHITE_PATCH > $WHITE_PATCH ) &
54
55                        if [ $INTER != 0 ]; then
56                            interdiff -w $RECENT_PATCH $PATCH > $INTERDIFF_PATCH
57                        else
58                            rm -f $INTERDIFF_PATCH
59                        fi
60                        ln --force $PATCH $RECENT_PATCH
61                        ls -hog $PATCH $RECENT_PATCH
62                    fi
63                fi
64            fi
65        fi
66    fi
67fi
68
Note: See TracBrowser for help on using the repository browser.