OpenPKG CVS Repository
http://cvs.openpkg.org/
____________________________________________________________________________
Server: cvs.openpkg.org Name: Thomas Lotterer
Root: /v/openpkg/cvs Email: [EMAIL PROTECTED]
Module: openpkg-tools Date: 12-Aug-2005 08:43:30
Branch: HEAD Handle: 2005081207432900
Modified files:
openpkg-tools/cmd dev.sh
Log:
"openpkg dev run" now accepting package list argument(s) and reads the
command from a -c option, enabling orthogonal behavior compared to
sibling subcommands
Summary:
Revision Changes Path
1.55 +8 -7 openpkg-tools/cmd/dev.sh
____________________________________________________________________________
patch -p0 <<'@@ .'
Index: openpkg-tools/cmd/dev.sh
============================================================================
$ cvs diff -u -r1.54 -r1.55 dev.sh
--- openpkg-tools/cmd/dev.sh 12 Aug 2005 06:41:49 -0000 1.54
+++ openpkg-tools/cmd/dev.sh 12 Aug 2005 06:43:29 -0000 1.55
@@ -2334,21 +2334,21 @@
}
run () {
- # the last parameter is the command to execute
force=0
dry=0
packages=""
- while [ ".$2" != . ]; do
+ while [ ".$1" != . ]; do
case ".$1" in
+ .-c ) shift; cmd="$1" ;;
.-f ) force=1 ;;
.-dry ) dry=1 ;;
+ .-* ) die "unsupported option \"$1\"." ;;
* ) packages="${packages} $1"
esac
shift
done
- execute="$1"
- if [ ".${execute}" = . ]; then
+ if [ ".${cmd}" = . ]; then
die "command for execution missing"
fi
@@ -2380,10 +2380,10 @@
for file in $files; do
echo "++ Running command for package specification: $file"
tmpfile="${OPENPKG_TEMP}/${GUID}"
- ${AWK} -vexecute="$execute" -vfile="$file" <${file} >${tmpfile} '
+ ${AWK} -vcmd="$cmd" -vfile="$file" <${file} >${tmpfile} '
BEGIN { flag=0 }
/^%prep$/ { flag=1 }
- /^$/ { if (flag == 1) print " "execute" #"file; flag=0 }
+ /^$/ { if (flag == 1) print " "cmd" #"file; flag=0 }
/.*/ { print $0 }'
if [ ${dry} -eq 0 ]; then
rpmE -bp ${tmpfile} --nodeps
@@ -2411,6 +2411,7 @@
.-a ) cleana=1 ;;
.-s ) cleans=1 ;;
.-f ) force=1 ;;
+ .-* ) die "unsupported option \"$1\"." ;;
* ) packages="${packages} $1"
esac
shift
@@ -2579,7 +2580,7 @@
\$ openpkg dev peek # [[spec]...] peek at file
list of binary package
\$ openpkg dev query # matchinstance|canonifybranch query script
internals
\$ openpkg dev release # [[spec]...] [-dry] [-m "msg"] release
package changes to master server
- \$ openpkg dev run # [[spec]...] [-dry] [-f] cmd append cmd to
%prep for spec and run rpm -bp
+ \$ openpkg dev run # [[spec]...] [-dry] -c "cmd" [-f] append cmd
to %prep for spec and run rpm -bp
\$ openpkg dev search # [[spec]...] search a
package on master server
\$ openpkg dev setup # [[[spec]ctag]exec] initial setup
of openpkg dev working environment
\$ openpkg dev srcdir # [dir] use a
different source directory
@@ .
______________________________________________________________________
The OpenPKG Project www.openpkg.org
CVS Repository Commit List [email protected]