Browse Source

Added the appropriate #! magic at the beginning of shell scripts. (Some modern shells don't like scripts to be without it.)

dtrg 18 years ago
parent
commit
454bdae81f

+ 1 - 0
bin/cc-and-mkdep.ack

@@ -1,3 +1,4 @@
+#!/bin/sh
 : '$Id$'
 
 : Compile and make dependencies. First argument is the file on which the

+ 2 - 1
bin/cc-and-mkdep.all

@@ -1,3 +1,4 @@
+#!/bin/sh
 : '$Id$'
 
 : Compile and make dependencies. First argument is the file on which the
@@ -16,5 +17,5 @@ do
 			;;
 	esac
 done
-$UTIL_HOME/lib.bin/cpp -d -m $cpp_args > $n
+$UTIL_HOME/lib.bin/cpp -d -m $cpp_args > $n 2>/dev/null
 exec $CC $*

+ 1 - 0
bin/cc-and-mkdep.sun

@@ -1,3 +1,4 @@
+#!/bin/sh
 : '$Id$'
 
 : Compile and make dependencies. First argument is the file on which the

+ 1 - 0
bin/do_deps

@@ -1,3 +1,4 @@
+#!/bin/sh
 : '$Id$'
 
 : Produce dependencies for all argument files

+ 1 - 0
bin/do_resolve

@@ -1,3 +1,4 @@
+#!/bin/sh
 : '$Id$'
 
 : Resolve name clashes in the files on the argument list. If these

+ 1 - 0
bin/lint-lib.ack

@@ -1,3 +1,4 @@
+#!/bin/sh
 : '$Id$'
 
 : Create a lint library file. The name of the library file is constructed

+ 1 - 0
bin/lint-lib.unix

@@ -1,3 +1,4 @@
+#!/bin/sh
 : '$Id$'
 
 : Create a lint library file. The name of the library file is constructed

+ 2 - 0
bin/mk_manpage

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 num=`expr $1 : '.*\.\([1-8]\)'`
 
 if [ -d $2/man ] ; then : ; else mkdir $2/man ; fi

+ 1 - 0
bin/rm_deps

@@ -1,3 +1,4 @@
+#!/bin/sh
 : $Id$
 
 : remove dependencies from a makefile, write result on standard output.

+ 2 - 0
distr/dwalk

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 : ${CDIR=.}
 ${DF-:} $CDIR .distr
 if test ! -r $DESTDIR/$CDIR/.distr

+ 1 - 0
distr/mk_distr_syms

@@ -1,3 +1,4 @@
+#!/bin/sh
 : Utility to make a tree of symbolic links to source tree.
 : Mount the source tree read-only, use this script, and then try installation.
 case $# in

+ 2 - 0
distr/mka

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 set -e
 for i in `tail +2 $DESTDIR/$1/LIST`
 do

+ 2 - 0
distr/mkf

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 if [ -f $DESTDIR/$1/$2 ]
 then
 	:

+ 2 - 0
first/cp_dir

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 set -e
 trap "rm -f /tmp/xx$$" 0 1 2 3 15
 case $2 in

+ 2 - 0
first/create_dir

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 if ( cd $1 ) 2>/dev/null
 then
 	:

+ 1 - 0
first/first

@@ -1,4 +1,5 @@
 #! /bin/sh
+
 case $0 in
 */first)
 	FDIR=`expr $0 : '\(.*\)/first'`

+ 2 - 0
first/get_answer

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 if read ANS
 then	echo
 else	echo "Sorry, got EOF when reading your answer"

+ 2 - 0
first/get_makepars

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 know_target=0
 case $SYSNAME in
 vax*|i386|sun*|sparc*|m68_sysV_0|m68020|mantra|pmds4|m68k4)

+ 2 - 0
first/get_sys

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 rm -f em_path.h
 echo "You will now be asked for the root directory of the ACK sources.
 This directory will not be changed by the installation process.

+ 2 - 0
first/get_sysvax

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 while :
 do
 	echo $E_FLAG "Which system-call library do you want to install for the VAX?

+ 11 - 2
first/install_tail

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 set -e
 
 PATH=::$CONFIG/bin:$UTIL_HOME/bin:/usr/ccs/bin:/usr/ucb:$PATH
@@ -6,8 +8,15 @@ export PATH
 $SRC_HOME/first/create_dir $CONFIG
 $SRC_HOME/first/create_dir $CONFIG/bin
 
-echo "PATH=:$CONFIG/bin:$UTIL_HOME/bin:$PATH; export PATH" > $CONFIG/bin/TakeAction
-cat $SRC_HOME/TakeAction >> $CONFIG/bin/TakeAction
+(
+	# Slight complication here to ensure that the #! magic at the
+	# beginning of TakeAction is preserved correctly.
+
+	head -1 $SRC_HOME/TakeAction
+	echo "PATH=:$CONFIG/bin:$UTIL_HOME/bin:$PATH; export PATH"
+	tail +2 $SRC_HOME/TakeAction
+) > $CONFIG/bin/TakeAction
+
 sed '/^#PARAMS/r make_macros' < $SRC_HOME/first/mk_makefile > $CONFIG/bin/mk_makefile
 cp $SRC_HOME/first/create_dir $CONFIG/bin/create_dir
 cp $SRC_HOME/first/cp_dir $CONFIG/bin/cp_dir

+ 2 - 0
first/limit_enquire

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 while :
 do
 	echo "The libraries will end up in the machine-independent part of the

+ 2 - 0
first/limit_impl

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 for i in $DISABLE_LANG
 do
 	ed -s $CONFIG/Action <<EOF

+ 1 - 0
first/lint_params

@@ -1,3 +1,4 @@
+#!/usr/bin/make
 
 # There are two choices for lint here: ACK lint and Unix lint.
 # The current setup is for ACK lint. If you want to use the Unix lint,

+ 4 - 1
first/mk_config

@@ -1,9 +1,12 @@
+#!/bin/sh
+
 set -e
 
 create_dir $CONFIG
 
 create_dir $CONFIG/bin
-echo "echo $SYSNAME" > $CONFIG/bin/ack_sys
+echo "#!/bin/sh" > $CONFIG/bin/ack_sys
+echo "echo $SYSNAME" >> $CONFIG/bin/ack_sys
 chmod +x $CONFIG/bin/ack_sys
 
 cd $SRC_HOME

+ 1 - 0
first/mk_makefile

@@ -1,3 +1,4 @@
+#!/bin/sh
 : '$Id$'
 
 : This shell script inserts make macros after a line

+ 2 - 0
first/mk_target

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 set -e
 
 : machine-dependant stuff

+ 1 - 0
first/target_comp

@@ -1,3 +1,4 @@
+#!/bin/sh
 # compiler set for target machine
 
 CC=cc#				# compiler to be used for compiling ACK

+ 1 - 1
first/util_comp

@@ -1,4 +1,4 @@
-
+#!/bin/sh
 # compiler set for producing runnable binaries (possibly using $(UTIL_HOME)).
 # This must describe the compiler with which $(UTIL_HOME) has been compiled.
 # If $(TARGET_HOME) is identical to $(UTIL_HOME), which usually will be

+ 2 - 0
lang/basic/src/maketokentab

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 ed -s Lpars.h <<'+'
 1d
 1,$s/# *define //

+ 2 - 0
lang/cem/cemcom.ansi/make.allocd

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 sed -e '
 s:^.*[ 	]ALLOCDEF[ 	].*"\(.*\)"[ 	]*\([0-9][0-9]*\).*$:\
 /* allocation definitions of struct \1 */\

+ 1 - 0
lang/cem/cemcom.ansi/make.hfiles

@@ -1,3 +1,4 @@
+#!/bin/sh
 : Update Files from database
 
 PATH=/bin:/usr/bin

+ 2 - 0
lang/cem/cemcom/make.allocd

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 sed -e '
 s:^.*[ 	]ALLOCDEF[ 	].*"\(.*\)"[ 	]*\([0-9][0-9]*\).*$:\
 /* allocation definitions of struct \1 */\

+ 1 - 0
lang/cem/cemcom/make.hfiles

@@ -1,3 +1,4 @@
+#!/bin/sh
 : Update Files from database
 
 PATH=/bin:/usr/bin

+ 2 - 0
lang/cem/cpp.ansi/make.allocd

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 sed -e '
 s:^.*[ 	]ALLOCDEF[ 	].*"\(.*\)"[ 	]*\([0-9][0-9]*\).*$:\
 /* allocation definitions of struct \1 */\

+ 1 - 0
lang/cem/cpp.ansi/make.hfiles

@@ -1,3 +1,4 @@
+#!/bin/sh
 : Update Files from database
 
 PATH=/bin:/usr/bin

+ 2 - 0
lang/m2/comp/make.allocd

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 sed -e '
 s:^.*[ 	]ALLOCDEF[ 	].*"\(.*\)"[ 	]*\([0-9][0-9]*\).*$:\
 /* allocation definitions of struct \1 */\

+ 1 - 0
lang/m2/comp/make.hfiles

@@ -1,3 +1,4 @@
+#!/bin/sh
 : Update Files from database
 
 PATH=/bin:/usr/bin

+ 2 - 0
lang/pc/comp/make.allocd

@@ -1,3 +1,5 @@
+#!/bin/sh
+
 sed -e '
 s:^.*[ 	]ALLOCDEF[ 	].*"\(.*\)"[ 	]*\([0-9][0-9]*\).*$:\
 /* allocation definitions of struct \1 */\

+ 1 - 0
lang/pc/comp/make.hfiles

@@ -1,3 +1,4 @@
+#!/bin/sh
 : Update Files from database
 
 PATH=/bin:/usr/bin