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
@ -54,20 +57,20 @@ BuildArch: noarch
%description %description
BeanShell is a small, free, embeddable, Java source interpreter with BeanShell is a small, free, embeddable, Java source interpreter with
object scripting language features, written in Java. BeanShell object scripting language features, written in Java. BeanShell
executes standard Java statements and expressions, in addition to executes standard Java statements and expressions, in addition to
obvious scripting commands and syntax. BeanShell supports scripted obvious scripting commands and syntax. BeanShell supports scripted
objects as simple method closures like those in Perl and objects as simple method closures like those in Perl and
JavaScript(tm). You can use BeanShell interactively for Java JavaScript(tm). You can use BeanShell interactively for Java
experimentation and debugging or as a simple scripting engine for your experimentation and debugging or as a simple scripting engine for your
applications. In short: BeanShell is a dynamically interpreted Java, applications. In short: BeanShell is a dynamically interpreted Java,
plus some useful stuff. Another way to describe it is to say that in plus some useful stuff. Another way to describe it is to say that in
many ways BeanShell is to Java as Tcl/Tk is to C: BeanShell is many ways BeanShell is to Java as Tcl/Tk is to C: BeanShell is
embeddable - You can call BeanShell from your Java applications to embeddable - You can call BeanShell from your Java applications to
execute Java code dynamically at run-time or to provide scripting execute Java code dynamically at run-time or to provide scripting
extensibility for your applications. Alternatively, you can call your extensibility for your applications. Alternatively, you can call your
Java applications and objects from BeanShell; working with Java Java applications and objects from BeanShell; working with Java
objects and APIs dynamically. Since BeanShell is written in Java and objects and APIs dynamically. Since BeanShell is written in Java and
runs in the same space as your application, you can freely pass runs in the same space as your application, you can freely pass
references to "real live" objects into scripts and return them as references to "real live" objects into scripts and return them as
results. results.
@ -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