SPECS: adapter - options support
glen
glen at pld-linux.org
Tue Aug 16 00:05:56 CEST 2005
Author: glen Date: Mon Aug 15 22:05:56 2005 GMT
Module: SPECS Tag: HEAD
---- Log message:
- options support
---- Files affected:
SPECS:
adapter (1.8 -> 1.9)
---- Diffs:
================================================================
Index: SPECS/adapter
diff -u SPECS/adapter:1.8 SPECS/adapter:1.9
--- SPECS/adapter:1.8 Wed Jul 27 10:23:59 2005
+++ SPECS/adapter Tue Aug 16 00:05:50 2005
@@ -1,8 +1,35 @@
#!/bin/sh
+self=$(basename "$0")
+usage="Usage: $self [--sort[-br]|-s] filename"
+
+t=`getopt -o hs --long help,sort,sort-br -n "$self" -- "$@"` || exit $?
+eval set -- "$t"
+
+while true; do
+ case "$1" in
+ -h|--help)
+ echo 2>&1 "$usage"
+ exit 1
+ ;;
+ --sort|--sort-br|-s)
+ export SORTBR=1
+ ;;
+ --)
+ shift
+ break
+ ;;
+ *)
+ echo 2>&1 "$self: Internal error: [$1] not recognized!"
+ exit 1
+ ;;
+ esac
+ shift
+done
+
if [ $# -ne 1 -o ! -f "$1" ]; then
- echo "Usage: $0 filename"
- exit 1
+ echo "$usage"
+ exit 1
fi
./builder --adapter "$1"
================================================================
---- CVS-web:
http://cvs.pld-linux.org/SPECS/adapter?r1=1.8&r2=1.9&f=u
More information about the pld-cvs-commit
mailing list