Replace perl usage with sed

This commit is contained in:
Michael Simacek 2016-07-21 14:52:08 +02:00
parent a6fe1b5640
commit 7fad1b4523

View File

@ -30,7 +30,7 @@
Name: bsh Name: bsh
Version: 1.3.0 Version: 1.3.0
Release: 34%{?dist} Release: 35%{?dist}
Epoch: 0 Epoch: 0
Summary: Lightweight Scripting for Java Summary: Lightweight Scripting for Java
License: (SPL or LGPLv2+) and Public Domain License: (SPL or LGPLv2+) and Public Domain
@ -45,7 +45,10 @@ Source3: %{name}-desktop.desktop
Patch0: %{name}-build.patch Patch0: %{name}-build.patch
Patch1: %{name}-xsl-fixes.patch Patch1: %{name}-xsl-fixes.patch
BuildRequires: java-devel BuildRequires: java-devel
BuildRequires: ant, bsf, ImageMagick, desktop-file-utils BuildRequires: ant
BuildRequires: bsf
BuildRequires: ImageMagick
BuildRequires: desktop-file-utils
BuildRequires: servlet BuildRequires: servlet
Requires: java-headless Requires: java-headless
Requires: bsf Requires: bsf
@ -165,7 +168,7 @@ convert src/bsh/util/lib/icon.gif \
# demo # demo
for i in `find tests -name \*.bsh`; do for i in `find tests -name \*.bsh`; do
perl -p -i -e 's,^\n?#!(/(usr/)?bin/java bsh\.Interpreter|/bin/sh),#!/usr/bin/env %{_bindir}/%{name},' $i sed -ri '1s,^#!(/(usr/)?bin/java bsh\.Interpreter|/bin/sh),#!/usr/bin/env %{_bindir}/%{name},' $i
if head -1 $i | grep '#!/usr/bin/env %{_bindir}/%{name}' >/dev/null; then if head -1 $i | grep '#!/usr/bin/env %{_bindir}/%{name}' >/dev/null; then
chmod 755 $i chmod 755 $i
fi fi
@ -239,6 +242,9 @@ fi
%{_datadir}/icons/hicolor/*x*/apps/%{name}.png %{_datadir}/icons/hicolor/*x*/apps/%{name}.png
%changelog %changelog
* Thu Jul 21 2016 Michael Simacek <msimacek@redhat.com> - 0:1.3.0-35
- Replace perl usage with sed
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.3.0-34 * Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0:1.3.0-34
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild