Ignore:
Timestamp:
Feb 2, 2008, 12:39:01 PM (16 years ago)
Author:
rosiere
Message:

Add new component : Read_unit (no tested)
Change functionnal_unit : now use type and operation to execute the good function
Change New_Component's script

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/IPs/systemC/processor/Morpheo/Behavioural/New_Component.sh

    r15 r76  
    77TMP_DIR="/tmp/$SOURCE_FILE"
    88
     9TYPE=("vbe" "vst");
     10
    911#-----[ usage ]------------------------------------------------------
    1012# input  : -
     
    1719    echo " - <directory> : localisation of component";
    1820    echo " - <name>      : name of component";
     21    echo " - <type>      : type of component : ${TYPE[@]}";
    1922    echo "";
    2023    echo " Note : This script must be execute in directory's script";
     
    4952    fi;
    5053
    51     if test $# -ne 2; then
     54    if test $# -ne 3; then
     55        usage;
     56    fi;
     57
     58    find=0;
     59    for type in ${TYPE[@]}; do
     60        if test "$3" = "$type"; then
     61            find=1;
     62            SOURCE_DIR=$SOURCE_DIR"_"$type;
     63        fi;
     64    done;
     65   
     66    if test $find -eq 0; then
    5267        usage;
    5368    fi;
     
    293308    rmdir $TMP_DIR
    294309   
    295 
    296310    #translation
    297311    rename_directory      "$1/$2" $SOURCE_FILE $2;
Note: See TracChangeset for help on using the changeset viewer.