Richard Frith-Macdonald schrieb: > > On 12 Feb 2007, at 16:47, Nicola Pero wrote: > >> >>> IIRC we had some extensive discussions on the mailing lists that >>> .sh/.csh should only be used for scripts that are sourced. But since >>> GNUStep.sh is referenced so often in the archives, I'm having a hard >>> time finding the discussion. >> >> >> I don't remember that discussion, but it's plain obvious that >> gnustep-make is >> not following that convention! There are lot of .sh files in >> gnustep-make >> that are not supposed to be sourced (eg, clean_cpu.sh, clean_os.sh, >> fixpath.sh, >> etc). >> >> We could change gnustep-make to follow the convention though if it >> can be argued that >> it is a good one - most of the scripts are only used internally in >> gnustep-make, >> so we should be able to rename them fairly easily. :-) >> >> Anyway, for a start I did change gnustep-config.sh to be gnustep- config. > > > I don't remember that discussion either ... perhaps it was on another > mailing list or a private email converstion?
I'll try to find it. Please give me a bit. > To the best of my knowledge, the standard convention is that a '.sh' > extension indicates a shell script and that implies no distinction > between one intended to be sourced and one intended to be executed. > > The distinction between a script intended to be executed and one > intended to be sourced is normally made by file permissions ... one is > made readable and executable but the other is made read only. > Incidentally, GNUstep.sh has the wrong permissions (0755 rather than > 0111) when installed by default on my system. > > On unix-like systems, the '#!/bin/sh' at the start of a script is > enough to ensure that the script is executed properly when simply run. > However, the '.sh' extension is important if you expect people to > interpret a script with a specific shell (eg. they know to do 'sh > foo.sh' rather than 'csh foo.sh'). > > So, if some discussion concluded that we should create a new convention > to distinguish between executable and sourceable scripts by whether > there is an extension or not ... I think it was wrong. [EMAIL PROTECTED]: /usr/local/src/svn/gnustep/projects/make$ locate -- '-config'|grep config$|grep bin|xargs file /usr/bin/aalib-config: Bourne shell script text executable /usr/bin/apr-config: Bourne shell script text executable /usr/bin/apt-config: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, dynamically linked (uses shared libs), stripped /usr/bin/apu-config: Bourne shell script text executable /usr/bin/artsc-config: Bourne shell script text executable /usr/bin/audiofile-config: Bourne shell script text executable /usr/bin/autoopts-config: Bourne shell script text executable /usr/bin/cups-config: Bourne shell script text executable /usr/bin/esd-config: Bourne shell script text executable /usr/bin/ffmpeg-config: Bourne shell script text executable /usr/bin/freetype-config: Bourne shell script text executable /usr/bin/gnucash-config: Bourne shell script text executable /usr/bin/gpg-error-config: Bourne shell script text executable /usr/bin/guile-1.6-config: a /usr/bin/guile \ script text executable /usr/bin/guile-config: symbolic link to `/etc/alternatives/guile-config' /usr/bin/imlib-config: Bourne shell script text executable /usr/bin/kde-config: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, dynamically linked (uses shared libs), stripped /usr/bin/libart2-config: Bourne shell script text executable /usr/bin/libgcrypt-config: Bourne shell script text executable /usr/bin/libgnutls-config: Bourne shell script text executable /usr/bin/libgnutls-extra-config: Bourne shell script text executable /usr/bin/libpng-config: symbolic link to `libpng12-config' /usr/bin/libpng12-config: Bourne shell script text executable /usr/bin/libpq3-config: symbolic link to `../lib/postgresql/bin/libpq3-config' /usr/bin/libtasn1-config: Bourne shell script text executable /usr/bin/opencdk-config: Bourne shell script text executable /usr/bin/pcre-config: Bourne shell script text executable /usr/bin/pkg-config: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.0, dynamically linked (uses shared libs), stripped /usr/bin/scrollkeeper-config: Bourne shell script text executable /usr/bin/sdl-config: Bourne shell script text executable /usr/bin/xml2-config: Bourne shell script text executable /usr/bin/xslt-config: Bourne shell script text executable /usr/lib/postgresql/bin/libpq3-config: Bourne-Again shell script text executable /usr/local/bin/gnustep-config: symbolic link to `/usr/GNUstep/System/Tools/gnustep-config.sh' /usr/sbin/base-config: Bourne shell script text executable /usr/sbin/modules-config: symbolic link to `apache-modconf' /usr/sbin/update-locale-config: perl script text executable /usr/sbin/wm-menu-config: Bourne shell script text executable [EMAIL PROTECTED]: /usr/local/src/svn/gnustep/projects/make$ locate -- '-config'|grep config.sh$|grep bin|xargs file /usr/local/bin/gnustep-config.sh: symbolic link to `/usr/GNUstep/System/Tools/gnustep-config.sh' [EMAIL PROTECTED]: /usr/local/src/svn/gnustep/projects/make$ I fear we would be starting a new convention by using .sh, but I'm sure we would get more discussion on conventions if take this to [EMAIL PROTECTED] Cheers, David _______________________________________________ Gnustep-dev mailing list [email protected] http://lists.gnu.org/mailman/listinfo/gnustep-dev
