Register
It is currently Thu Apr 24, 2014 12:17 am

Script to check good compilation of packets


All times are UTC - 6 hours


Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Thu Apr 30, 2009 4:42 am   

Joined: Thu Apr 30, 2009 4:40 am
Posts: 1
Hi,

I'm making a script to compile some packets and I need for each one to check if the compilation is good...

I need to check if "./configure" and "make" runs correctly.

Are any scripting commands to make this?

Thanks


Top
 Profile  
 PostPosted: Sat May 02, 2009 11:48 am   

Joined: Mon Nov 17, 2008 7:25 am
Posts: 221
the $? might help you... it contains the statuscode of the last executed program.

Code:
sajko@hanna:~> ls | grep non-existant
sajko@hanna:~> echo $?
1
sajko@hanna:~> ls | grep txt
txt
sajko@hanna:~> echo $?
0


This proves that grep returns statuscode 1 if nothing is found and 0 if it does find anything

Best regards
Fredrik Eriksson


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP