LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-10-2012, 10:55 PM   #1
Konphine
Member
 
Registered: Jul 2011
Location: Phoenix, New York
Distribution: Slackware 13.37
Posts: 376

Rep: Reputation: 11
SlackBuild newbie questions


Hello, I'm trying to create a few *.SlackBuild files with my own additions to the ./configure sections but I'm concerned about what these 2 sections do and if they affect ./configure:

Code:
set -e
and
Code:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
I'm not 100% sure what either do, and "man set" provided no "-e" option in it's listing so I was unable to find that and Google searches are too wide ranged in various subjects to determine "set -e"'s function.

Thank you in advance.
 
Old 02-10-2012, 11:02 PM   #2
willysr
Senior Member
 
Registered: Jul 2004
Location: Jogja, Indonesia
Distribution: Slackware-Current
Posts: 4,661

Rep: Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784Reputation: 1784
Quote:
Originally Posted by Konphine View Post
Hello, I'm trying to create a few *.SlackBuild files with my own additions to the ./configure sections but I'm concerned about what these 2 sections do and if they affect ./configure:

Code:
set -e
and
Code:
find $PKG | xargs file | grep -e "executable" -e "shared object" | grep ELF \
  | cut -f 1 -d : | xargs strip --strip-unneeded 2> /dev/null || true
set -e: This tells bash that it should exit the script if any statement returns a non-true return value.
 
Old 02-11-2012, 12:26 AM   #3
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
There's documentation on set here.

The pipeline runs strip --strip-unneeded on each ELF executable in the package. The strip man page has details on what --strip-unneeded does. Most (all?) binary executables in packages are ELFs. The || true ensures that the return code from the pipeline is 0 so, if any of the other commands fail, the set -e does not cause the script to exit.
 
Old 02-11-2012, 12:45 AM   #4
Konphine
Member
 
Registered: Jul 2011
Location: Phoenix, New York
Distribution: Slackware 13.37
Posts: 376

Original Poster
Rep: Reputation: 11
I see, thank you both for your help. It's very appreciated.
 
Old 02-11-2012, 12:56 AM   #5
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Thanks for thanks

The thread can be marked SOLVED via the Thread Tools menu.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slackbuild Problem and Architecture Questions jkirchner Slackware 5 07-17-2011 11:17 AM
[SOLVED] Before I try to install the SlackBuild of Google Earth, I have 2 questions... Robert.Thompson Slackware 12 07-06-2011 10:53 AM
[SOLVED] Some SlackBuild questions... Robert.Thompson Slackware 6 02-18-2011 02:38 PM
[SOLVED] A few questions about GNOME SlackBuild for 13.1 Robert.Thompson Slackware 11 01-12-2011 02:54 PM
SlackBuild / ./configure questions shilo Slackware 18 10-04-2005 02:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 07:16 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration