Page 1 of 1

Suggested modif on buildscript 20100225 build for Ubuntu

Posted: Fri Apr 02, 2010 7:14 pm
by jscoobyced
Hi,

I installed the buildscript toolchain on my Ubuntu 9.10 64bits. There was an error around the end of the script, during the 'strip' part for windows .dll and -gccbug

I modified this part of the "build-devkit.sh" script from:

Code: Select all

# exclude dll for windows, directories & the gccbug text file
    if  ! [[ "$f" == *.dll || -d $f || "$f" == *-gccbug ]]
      then
      strip $f
    fi
to

Code: Select all

# exclude dll for windows, directories & the gccbug text file
  if [ ! `uname` = "Linux" ]; then
    if  ! [[ "$f" == *.dll || -d $f || "$f" == *-gccbug ]]; then
      strip $f
    fi
  else
    if ! echo "$f" | grep -q '.dll$'; then
      if ! echo "$f" | grep -q '\-gccbug$'; then
        if [ ! -d $f ]; then
          strip $f
        fi
      fi
    fi
  fi
So it still supports the MinGW or other environments but also BASH/SH native OSes. Maybe not the best way but it does the trick.

Re: Suggested modif on buildscript 20100225 build for Ubuntu

Posted: Sat Apr 03, 2010 5:10 am
by jscoobyced
Thanks for moving to the right topic :mrgreen:

Re: Suggested modif on buildscript 20100225 build for Ubuntu

Posted: Sat Apr 03, 2010 10:17 am
by WinterMute
No worries :)

Is this a bashishm that fails in dash? Being honest I'm not entirely sure if the example Makefiles work on dash either.

What might be better is using shell code that works in both rather than testing.

Re: Suggested modif on buildscript 20100225 build for Ubuntu

Posted: Mon Apr 05, 2010 5:07 pm
by jscoobyced
Well... this was just a quick modification, to make it build successfully on my box. It worked for me but I don't know if it is compatible with many shells.... and it's rather ugly :D
Now I am not sure there is a simple way to check for these file names that is compatible everywhere.