mirror of
https://github.com/php/php-src.git
synced 2025-08-18 23:18:56 +02:00

This patch makes several scripts and PHP development tools files executable and adds more proper shebangs to the PHP scripts. The `#!/usr/bin/env php` shebang provides running the script via `./script.php` and uses env to find PHP script location on the system. At the same time it still provides running the script with a user defined PHP location using `php script.php`.
41 lines
645 B
Bash
Executable file
41 lines
645 B
Bash
Executable file
#! /bin/sh
|
|
|
|
# replacement for genif.pl
|
|
|
|
infile=$1
|
|
shift
|
|
srcdir=$1
|
|
shift
|
|
extra_module_ptrs=$1
|
|
shift
|
|
awk=$1
|
|
shift
|
|
|
|
if test -z "$infile" || test -z "$srcdir"; then
|
|
echo "please supply infile and srcdir"
|
|
exit 1
|
|
fi
|
|
|
|
header_list=
|
|
olddir=`pwd`
|
|
cd $srcdir
|
|
|
|
module_ptrs="$extra_module_ptrs`echo $@ | $awk -f ./build/order_by_dep.awk`"
|
|
|
|
for ext in ${1+"$@"} ; do
|
|
ext_dir=`echo "$ext" | cut -d ';' -f 2`
|
|
header_list="$header_list $ext_dir/*.h*"
|
|
done
|
|
|
|
includes=`$awk -f ./build/print_include.awk $header_list`
|
|
|
|
cd $olddir
|
|
|
|
cat $infile | \
|
|
sed \
|
|
-e "s'@EXT_INCLUDE_CODE@'$includes'" \
|
|
-e "s'@EXT_MODULE_PTRS@'$module_ptrs'" \
|
|
-e 's/@NEWLINE@/\
|
|
/g'
|
|
|
|
|