LinuxQuestions.org
Review your favorite Linux distribution.
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 12-08-2010, 09:08 AM   #1
smb426
LQ Newbie
 
Registered: Nov 2010
Posts: 11

Rep: Reputation: 0
What language are the SlackBuild scripts written in?


What language is used to write the SlackBuild scripts? I'm interested in learning to write them.
 
Old 12-08-2010, 09:25 AM   #2
sizemj
Member
 
Registered: Sep 2009
Location: Louisville, KY
Distribution: Slackware. Fedora, FreeBSD
Posts: 32

Rep: Reputation: 9
Bash,

Here is some info:

http://www.slackwiki.org/Writing_A_SlackBuild_Script
 
Old 12-08-2010, 09:33 AM   #3
rg3
Member
 
Registered: Jul 2007
Distribution: Fedora
Posts: 527

Rep: Reputation: Disabled
More generally, they're written in bourne shell. "bash" is a shell capable of interpreting bourne shell scripts, but it also has a few extensions not present in bourne shell. These are sometimes called "bashisms". They are probably present here and there in some scripts. Note that you could write a slackbuild in any language, but it makes more sense to write them as bourne shell scripts.
 
Old 12-08-2010, 10:32 AM   #4
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
The template SlackBuild scripts use /bin/sh which, on a default Slackware installation, is a symlink to /bin/bash. When bash is called as sh it works as a close approximation of the POSIX shell which is a superset of the Bourne shell.

Recently there was an inconclusive debate on the SlackBuild mailing list about whether to allow SlackBuild scripts using /bin/bash
 
Old 12-08-2010, 09:34 PM   #5
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
just as another note, bash has some shortcuts and usefull 'bashisms' that are perfectly safe to use but are concidered bad pactice because it makes it uncompatible with POSIX sh shell.

Last edited by lumak; 12-08-2010 at 09:36 PM.
 
Old 12-09-2010, 02:36 AM   #6
dive
Senior Member
 
Registered: Aug 2003
Location: UK
Distribution: Slackware
Posts: 3,467

Rep: Reputation: Disabled
It's usually a good idea to avoid bashisms so that the scripts work in other shells.
 
  


Reply


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
sendmail.cf mail rule written language lasantha Linux - Networking 6 09-06-2019 11:52 AM
SlackBuild scripts stu_mueller Slackware 15 04-04-2008 01:03 AM
where do i put my written scripts mahmoud Linux - Newbie 2 11-27-2007 05:42 PM
Using slackbuild scripts Steve50 Slackware 3 10-11-2006 02:42 AM
What language was the unreal tournament installer written in? Onemessedupjedi Programming 2 07-05-2004 01:48 AM

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

All times are GMT -5. The time now is 12:49 AM.

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