LinuxAnswers - the LQ Linux tutorial section.
Go Back > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Slackware This Forum is for the discussion of Slackware Linux.


  Search this Thread
Old 01-03-2007, 02:30 PM   #46
Alien Bob
Slackware Contributor
Registered: Sep 2005
Location: Eindhoven, The Netherlands
Distribution: Slackware
Posts: 5,797

Rep: Reputation: Disabled

About this:
set -e #Stop the script on errors. Also, followed some examples (from robw810?) and sprinkled in some "|| exit 1" throughout. Is this all correct/good idea?
This is overkill. With "set -e", the script will already exit on any error, so there will be no need for the additional " || exit 1" to catch errors.
Instead of that, it would make sense instead to place " || true" in strategic places.
What this does? Well think of the line where the docs are copied:
cp -a $PDOCS $PKG/usr/doc/$PNAME-$PVERSION
and suppose you are upgrading a package and your newer sources miss one of the doc files that was present in the older release. The file-copy will exit with an error (file not found) and the SlackBuild will abort due to the "set -e".
If you don't want that, you rewrite that line as
cp -a $PDOCS $PKG/usr/doc/$PNAME-$PVERSION || true
in which case the file-copy command will never cause the SlackBuild to abort when a doc file is missing.

Old 06-19-2008, 11:45 PM   #47
Registered: Sep 2006
Posts: 32

Rep: Reputation: 15

I have recompiled the slackware12.1 kernel with vmware modules. I need to build this kernel as package. Can I use this script for building package?



Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
The perfect gtkpod.SlackBuild shilo Slackware 3 08-04-2005 06:31 PM
GNOME.SlackBuild jmdlcar Slackware 1 06-03-2005 04:52 PM
KDE.SlackBuild spaceballs Slackware 8 04-01-2005 08:42 AM
GSB [Gnome Slackbuild] Xian Slackware 27 03-12-2005 07:53 PM
SlackBuild system thegeekster Slackware 7 06-01-2004 06:59 PM

All times are GMT -5. The time now is 11:07 AM.

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