]> git.pld-linux.org Git - packages/rpm-build-macros.git/blobdiff - rpm.macros
- rel 2; invalid shebangs now terminate build
[packages/rpm-build-macros.git] / rpm.macros
index 59712fa5c6a303ee60628af7805d42a59b71c086..b0f4195e8a12ca869b7e89614ccb2cfd19bb7831 100644 (file)
@@ -809,8 +809,7 @@ __spec_install_post_check_shebangs() { \
 %{!?debug:set +x;} \
        fail=0; \
        echo "Checking script shebangs..."; \
-       find $RPM_BUILD_ROOT -type f -perm -500 -print | \
-       while read f ; do \
+       for f in $(find $RPM_BUILD_ROOT -type f -perm -500 -print); do \
                shebang="$(sed -e'1s/#! *\(.*\)/\1/;t;d;q' "$f")" ; \
                f="${f##$RPM_BUILD_ROOT}"; \
                case "$shebang" in \
@@ -830,7 +829,8 @@ __spec_install_post_check_shebangs() { \
                esac ; \
        done ; \
        echo " DONE" ; \
-}; %{!?no_install_post_check_shebangs:__spec_install_post_check_shebangs} }
+        %{!?no_install_post_check_shebangs:return $fail;} \
+}; __spec_install_post_check_shebangs }}
 
 # Remove common Perl files we don't package
 %__spec_install_post_perl_clean {\
This page took 0.022762 seconds and 4 git commands to generate.