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

Last change on this file since 83 was 83, checked in by rosiere, 16 years ago

Add component : Context_State (manage miss prediction, exception , decod_enable, synchronisation instruction ...)

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