Replace head -1 | grep by sed.

Signed-off-by: Johannes Sixt <johannes.sixt@telecom.at>
This commit is contained in:
Johannes Sixt
2008-02-26 10:42:54 +01:00
parent 792d7e9b0e
commit bdb6d4ec8e

View File

@@ -34,10 +34,10 @@ boilerplates.made : $(bpsrc)
mkdir -p blt/$$dir && \
case "$$boilerplate" in \
*--) ;; \
*) if head -1 $$boilerplate | grep -q '^#!/'; then \
cp $$boilerplate blt/$${dst}$(NOEXECTEMPL); \
*) if test -n "$$(sed -ne '/^#!\//p' -e '1q' < "$$boilerplate")"; then \
cp "$$boilerplate" "blt/$${dst}$(NOEXECTEMPL)"; \
else \
cp $$boilerplate blt/$$dst; \
cp "$$boilerplate" "blt/$$dst"; \
fi ;; \
esac || exit; \
done && \