SPECS: adapter - add -o arg
glen
glen at pld-linux.org
Mon Jan 5 19:05:18 CET 2009
Author: glen Date: Mon Jan 5 18:05:18 2009 GMT
Module: SPECS Tag: HEAD
---- Log message:
- add -o arg
---- Files affected:
SPECS:
adapter (1.31 -> 1.32)
---- Diffs:
================================================================
Index: SPECS/adapter
diff -u SPECS/adapter:1.31 SPECS/adapter:1.32
--- SPECS/adapter:1.31 Mon Oct 27 22:25:33 2008
+++ SPECS/adapter Mon Jan 5 19:05:12 2009
@@ -32,7 +32,8 @@
skip desc wrapping
-a|--skip-defattr
skip %defattr corrections
-
+-o
+ do not do any diffing, just dump the output
"
if [ ! -x /usr/bin/getopt ]; then
@@ -45,7 +46,7 @@
exit 1
fi
-t=$(getopt -o hsmdaV --long help,version,sort,sort-br,no-macros,skip-macros,skip-desc,skip-defattr -n "$self" -- "$@") || exit $?
+t=$(getopt -o hsomdaV --long help,version,sort,sort-br,no-macros,skip-macros,skip-desc,skip-defattr -n "$self" -- "$@") || exit $?
eval set -- "$t"
while true; do
@@ -69,6 +70,9 @@
-V|--version)
echo "$VERSIONSTRING"
exit 0
+ ;;
+ -o)
+ outputonly=1
;;
--)
shift
@@ -214,7 +218,10 @@
$awk -f $adapter $SPECFILE > $tmp || exit
- if [ "$(diff --brief $SPECFILE $tmp)" ]; then
+ if [ "$outputonly" = 1 ]; then
+ cat $tmp
+
+ elif [ "$(diff --brief $SPECFILE $tmp)" ]; then
diff -u $SPECFILE $tmp > $tmp.diff
if [ -t 1 ]; then
diffcol $tmp.diff | less -r
================================================================
---- CVS-web:
http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/SPECS/adapter?r1=1.31&r2=1.32&f=u
More information about the pld-cvs-commit
mailing list