OpenCores
URL https://opencores.org/ocsvn/minsoc/minsoc/trunk

Subversion Repositories minsoc

[/] [minsoc/] [branches/] [rc-1.0/] [utils/] [contributions/] [setup/] [beautify.sh] - Diff between revs 41 and 43

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 41 Rev 43
Line 11... Line 11...
{
{
        echo -e "\033[1m\033[31mError: $1\033[0m\n";
        echo -e "\033[1m\033[31mError: $1\033[0m\n";
        exit 1;
        exit 1;
}
}
 
 
function readpass
 
{
 
        stty_orig=`stty -g`
 
        stty -echo
 
        read `echo $1`
 
        stty $stty_orig
 
}
 
 
 
function execcmd
function execcmd
{
{
        # Print Message
        # Print Message
        echo -e "\033[35m$1\033[0m"
        echo -e "\033[35m$1\033[0m"
        # Execute command
        # Execute command
Line 40... Line 32...
                exit 1;
                exit 1;
 
 
        fi
        fi
}
}
 
 
function changelinefile
 
{
 
        a=0;
 
        b=0;
 
        sed -e "s/$1/$2/" $3 > /tmp/changedfile;
 
        if [ $? -eq 0 ]
 
        then
 
                a=1;
 
        fi
 
        mv /tmp/changedfile $3;
 
        if [ $? -eq 0 ]
 
        then
 
                b=1;
 
        fi
 
        execcmd "Change file $3" "test $a -eq 1 -a $b -eq 1"
 
}
 
 
 
if [ $DEBUG -eq 1 ]
if [ $DEBUG -eq 1 ]
then
then
        cecho "Debug mode on! Nothing will actually run";
        cecho "Debug mode on! Nothing will actually run";
fi
fi
 
 
 No newline at end of file
 No newline at end of file

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.