source: trunk/IPs/systemC/processor/Morpheo/Script/version.sh @ 138

Last change on this file since 138 was 138, checked in by rosiere, 14 years ago

1) add counters_t type for interface
2) fix in check load in load_store_unit
3) add parameters (but not yet implemented)
4) change environment and add script (distcc_env.sh ...)
5) add warning if an unser change rename flag with l.mtspr instruction
6) ...

  • Property svn:executable set to *
File size: 2.4 KB
Line 
1#!/bin/bash
2
3#-----------------------------------------------------------
4# $Id$
5#-----------------------------------------------------------
6#-----[ usage ]---------------------------------------------
7function usage ()
8{
9    echo "Usage              : ${0} action";
10    echo "Arguments          : ";
11    echo " * action";       
12    echo "   * add           : add all file unpresent in project and set proprity";
13    echo "   * commit        : update revision number and commit";
14    echo "   * status        : print only locally modified items";
15    echo "   * status_new    : print only locally new      items";
16    echo "   * status_delete : print only locally new      items";
17    echo "   * help          : print this message";
18    echo "Note               :";
19    echo " * Morpheo's environnement must be positionned.";
20    exit;
21}
22
23#-----[ main ]----------------------------------------------
24function main ()
25{
26    # Test operand
27    if test ${#} -ne 1; then
28        usage ${*};
29    fi;
30
31    if test -z ${MORPHEO_TOPLEVEL}; then
32        usage ${*};
33    fi;
34
35    local file_version="${MORPHEO_TOPLEVEL}/Version";
36    local major_version="0";
37    local minor_version="2";
38    local codename="Castor";
39
40    export LC_ALL=C;
41    export EDITOR="emacs";
42
43    local pwd=${PWD};
44   
45    case ${1} in
46        "commit")
47            cd ${MORPHEO_TOPLEVEL};
48   
49            # +1 because is the next revision
50            local revision=$(($(export LC_ALL=C; svnversion  | tr -d [:alpha:] | cut -d : -f 2) + 1));
51            local date_day=$(date +%d);
52            local date_month=$(date +%m);
53            local date_year=$(date +%Y);
54           
55            echo "${major_version} ${minor_version} ${revision} ${codename} ${date_day} ${date_month} ${date_year}" > ${file_version};
56           
57            svn commit;
58
59            cd ${pwd};
60            ;;
61
62        "add")
63            cd ${MORPHEO_TOPLEVEL};
64
65            for i in $(svn status | grep '?'); do
66                if test -e ${i}; then
67                    svn add ${i};
68                    svn propset svn:keywords "Id" ${i} -R
69                fi;
70            done;
71
72            cd ${pwd};
73            ;;
74
75        "status")
76            cd ${MORPHEO_TOPLEVEL};
77
78            svn status;
79
80            cd ${pwd};
81            ;;
82
83        "status_new")
84            cd ${MORPHEO_TOPLEVEL};
85
86            svn status | grep '?';
87
88            cd ${pwd};
89            ;;
90
91        "status_delete")
92            cd ${MORPHEO_TOPLEVEL};
93
94            svn status | grep '!';
95
96            cd ${pwd};
97            ;;
98           
99        "help")
100            usage ${*};
101            ;;
102        *)
103            usage ${*};
104    esac
105}
106
107#-----[ Body ]----------------------------------------------
108main ${*}
Note: See TracBrowser for help on using the repository browser.