LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   What language are the SlackBuild scripts written in? (https://www.linuxquestions.org/questions/slackware-14/what-language-are-the-slackbuild-scripts-written-in-849052/)

smb426 12-08-2010 09:08 AM

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.

sizemj 12-08-2010 09:25 AM

Bash,

Here is some info:

http://www.slackwiki.org/Writing_A_SlackBuild_Script

rg3 12-08-2010 09:33 AM

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.

catkin 12-08-2010 10:32 AM

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

lumak 12-08-2010 09:34 PM

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.

dive 12-09-2010 02:36 AM

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


All times are GMT -5. The time now is 04:57 AM.