3 # Convert an Old-Style ROCK Linux Extension to the standard package format.
5 # --- T2-COPYRIGHT-NOTE-BEGIN ---
6 # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
8 # T2 SDE: misc/archive/extconv.sh
9 # Copyright (C) 2004 - 2005 The T2 SDE Project
10 # Copyright (C) 1998 - 2003 ROCK Linux Project
12 # More information can be found in the files COPYING and README.
14 # This program is free software; you can redistribute it and/or modify
15 # it under the terms of the GNU General Public License as published by
16 # the Free Software Foundation; version 2 of the License. A copy of the
17 # GNU General Public License can be found in the file COPYING.
18 # --- T2-COPYRIGHT-NOTE-END ---
20 if [ -z "$1" -o ! -f "$1.ext" ] ; then
21 [ ! -f "$1.ext" ] && echo "No such file: $1.ext"
22 echo "Usage: $0 <ext-name>"
26 egrep '^# +\[' $1.ext |
sed 's,^# *,,' | \
27 egrep -v '^\[(P|PRI|PRIORITY)\]' > $1.desc
29 pri
=`{ egrep '^# +\[(P|PRI|PRIORITY)\] +' $1.ext ; echo ". . 5" ; } | head -n 1 | tr -s ' ' | cut -f3 -d' '`
30 echo "[P] X ------6--9 300.$pri" >> $1.desc
34 echo "# Converted from $name.ext by <rock-base>/misc/archive/extconv.sh"
37 echo 'if [ "$prefix" != "opt/$pkg" ] ; then'
38 echo ' abort "!! This package is converted from an old-style .ext file and'
39 echo '!! might only compile fine when built with the Build-Pkg'
40 echo '!! option \"-prefix /opt/$pkg\"."'
44 egrep -v '^# +\[' $1.ext