1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
From: Richard Lewis <richard.lewis.debian@googlemail.com>
Date: Sat, 29 Jun 2024 19:52:44 +0100
Subject: check_php
Add a helper to check whether files are php scripts, this is needed
for the check of files in /tmp -- that test uses 'find', but we can't
safely run a shell pipeline on the results unless we use a helper,
given that files in /tmp are likely to have unusual characters in
their names
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1071377
Forwarded: yes
(Forwarded by email: 21 Dec 2024)
---
check_php | 2 ++
1 file changed, 2 insertions(+)
create mode 100755 check_php
diff --git a/check_php b/check_php
new file mode 100755
index 0000000..f23d4dc
--- /dev/null
+++ b/check_php
@@ -0,0 +1,2 @@
+#!/bin/sh
+head -n1 "$1" | grep -q "^#!.*php" && echo "$1"
|