This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] contrib/patch_tester.sh, 3 of 7


On Wed, Mar 5, 2008 at 5:53 PM, Janis Johnson <janis187@us.ibm.com> wrote:
> This patch to contrib/patch_tester.sh detects some errors when the
>  script first starts up, to abort at that time rather than later when
>  the messages might be more confusing.  It's on top of one of my
>  earlier patches so won't apply cleanly on its own.
>
>  Sebastian, OK for trunk?
>

Yes, thanks.

>  --- patch_tester.sh.2   2008-03-05 15:29:23.000000000 -0800
>  +++ patch_tester.sh     2008-03-05 15:29:28.000000000 -0800
>  @@ -76,6 +76,15 @@ EOF
>      exit 1
>   }
>
>  +makedir () {
>  +    DIRNAME=$1
>  +    mkdir -p $DIRNAME
>  +    if [ $? -ne 0 ]; then
>  +       echo "ERROR: could not make directory $DIRNAME"
>  +       exit 1
>  +    fi
>  +}
>  +
>   while [ $# -ne 0 ]; do
>      case $1 in
>         -j*)
>  @@ -131,13 +140,17 @@ else
>      BUILD=$4
>   fi
>
>  -[ -d $PATCHES ] || mkdir -p $PATCHES
>  -[ -d $STATE ] || mkdir -p $STATE
>  -[ -d $STATE/patched ] || mkdir -p $STATE/patched
>  -[ -d $SOURCE ] || mkdir -p $SOURCE
>  +[ -d $PATCHES ] || makedir $PATCHES
>  +[ -d $STATE ] || makedir $STATE
>  +[ -d $STATE/patched ] || makedir $STATE/patched
>  +[ -d $SOURCE ] || makedir $SOURCE
>   [ -f $SOURCE/config.guess ] || {
>      cd $SOURCE
>      svn -q co $svnpath/trunk .
>  +    if [ $? -ne 0 ]; then
>  +       echo "ERROR: initial svn checkout failed"
>  +       exit 1
>  +    fi
>   }
>
>   VERSION=`svn info $SOURCE | grep "^Revision:" | sed -e "s/^Revision://g" -e "s/ //g"`
>
>
>



-- 
Sebastian
AMD - GNU Tools


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]