[Fai-commit] r6765 - in trunk: bin man
Thomas Lange
lange at alioth.debian.org
Sun Oct 23 10:52:37 UTC 2011
Author: lange
Date: 2011-10-23 10:52:37 +0000 (Sun, 23 Oct 2011)
New Revision: 6765
Modified:
trunk/bin/ftar
trunk/man/ftar.8
Log:
add option -i. Ignore "no matching class" and exit with 0
Modified: trunk/bin/ftar
===================================================================
--- trunk/bin/ftar 2011-10-23 10:39:17 UTC (rev 6764)
+++ trunk/bin/ftar 2011-10-23 10:52:37 UTC (rev 6765)
@@ -79,11 +79,13 @@
removedir=0
tardone=0
single=0
+ignore=0
-while getopts 1hDdrvs:t:c: opt ; do
+while getopts 1hDdrvs:t:c:i opt ; do
case "$opt" in
d) deletefiles=1 ;;
D) debug=1 ;;
+ i) ignore=1 ;;
r) removedir=1 ;;
# v) verbose=1 ;;
1) single=1 ;;
@@ -132,7 +134,14 @@
[ -f $fpath/$c.txz ] && extract $fpath/$c.txz xzcat
done
-[ $tardone -eq 0 ] && die 1 "ftar: No matching class found in $fpath"
+if [ $tardone -eq 0 ]; then
+ if [ $ignore -eq 1 ]; then
+ echo "ftar: No matching class found in $fpath"
+ exit 0
+ else
+ die 1 "ftar: No matching class found in $fpath"
+ fi
+fi
exit 0
Modified: trunk/man/ftar.8
===================================================================
--- trunk/man/ftar.8 2011-10-23 10:39:17 UTC (rev 6764)
+++ trunk/man/ftar.8 2011-10-23 10:52:37 UTC (rev 6765)
@@ -51,6 +51,9 @@
.B \-h
Show help, version and summary of options.
.TP
+.B \-i
+Ignore warnings about no matching class and always exit with 0.
+.TP
.B \-r
Recursively remove files in target directory before extracting archive.
.TP
More information about the Fai-commit
mailing list