Suggested modif on buildscript 20100225 build for Ubuntu

Got something cool to help make the toolchains better? Post it here.
Post Reply
User avatar
jscoobyced
Posts: 11
Joined: Fri Apr 02, 2010 12:57 pm
Location: Bangkok

Suggested modif on buildscript 20100225 build for Ubuntu

Post by jscoobyced » Fri Apr 02, 2010 7:14 pm

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.
dkp newbie

User avatar
jscoobyced
Posts: 11
Joined: Fri Apr 02, 2010 12:57 pm
Location: Bangkok

Re: Suggested modif on buildscript 20100225 build for Ubuntu

Post by jscoobyced » Sat Apr 03, 2010 5:10 am

Thanks for moving to the right topic :mrgreen:
dkp newbie

WinterMute
Site Admin
Posts: 1986
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: Suggested modif on buildscript 20100225 build for Ubuntu

Post by WinterMute » Sat Apr 03, 2010 10:17 am

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.
Help keep devkitPro toolchains free, Donate today

Personal Blog

User avatar
jscoobyced
Posts: 11
Joined: Fri Apr 02, 2010 12:57 pm
Location: Bangkok

Re: Suggested modif on buildscript 20100225 build for Ubuntu

Post by jscoobyced » Mon Apr 05, 2010 5:07 pm

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.
dkp newbie

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests