#!/bin/sh
#
-# This is adapter v0.27. Adapter adapts .spec files for PLD Linux.
+# This is adapter v0.28. Adapter adapts .spec files for PLD Linux.
#
# Copyright (C) 1999-2003 PLD-Team <feedback@pld-linux.org>
# Authors:
-# Micha³ Kuratczyk <kura@pld.org.pl>
+# Michał Kuratczyk <kura@pld.org.pl>
# Sebastian Zagrodzki <s.zagrodzki@mimuw.edu.pl>
-# Tomasz K³oczko <kloczek@rudy.mif.pg.gda.pl>
+# Tomasz Kłoczko <kloczek@rudy.mif.pg.gda.pl>
# Artur Frysiak <wiget@pld-linux.org>
# Michal Kochanowicz <mkochano@pld.org.pl>
-# Elan Ruusamäe <glen@pld-linux.org>
+# Elan Ruusamäe <glen@pld-linux.org>
#
# See cvs log adapter{,.awk} for list of contributors
#
exit 1
fi
+if [ ! -x /usr/bin/patch ]; then
+ echo >&1 "You need to install patch to use adapter"
+ exit 1
+fi
+
t=`getopt -o hsmda --long help,sort,sort-br,no-macros,skip-macros,skip-desc,skip-defattr -n "$self" -- "$@"` || exit $?
eval set -- "$t"
{
local tmpdir
tmpdir=$(mktemp -d ${TMPDIR:-/tmp}/adapter-XXXXXX) || exit
- awk -f adapter.awk $SPECFILE > $tmpdir/$SPECFILE || exit
+ gawk -f adapter.awk $SPECFILE > $tmpdir/$SPECFILE || exit
if [ "`diff --brief $SPECFILE $tmpdir/$SPECFILE`" ]; then
diff -u $SPECFILE $tmpdir/$SPECFILE > $tmpdir/$SPECFILE.diff