SOURCES: flare.sh - make it better

glen glen at pld-linux.org
Mon Jun 13 16:58:35 CEST 2005


Author: glen                         Date: Mon Jun 13 14:58:35 2005 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- make it better

---- Files affected:
SOURCES:
   flare.sh (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SOURCES/flare.sh
diff -u SOURCES/flare.sh:1.2 SOURCES/flare.sh:1.3
--- SOURCES/flare.sh:1.2	Mon Jun 13 16:56:10 2005
+++ SOURCES/flare.sh	Mon Jun 13 16:58:29 2005
@@ -5,10 +5,15 @@
 # does not need write permission in current directory.
 # Requires: mktemp
 
-tmp=`mktemp -d ${TMPDIR:-/tmp}/flareXXXXXX`
-trap 'rc=$?; rm -rf $tmp; exit $rc' EXIT INT QUIT TERM
+if [ -f "$1" ]; then
+	tmp=`mktemp -d ${TMPDIR:-/tmp}/flareXXXXXX`
+	trap 'rc=$?; rm -rf $tmp; exit $rc' EXIT INT QUIT TERM
 
-cp "$1" "$tmp/file.swf"
-cd "$tmp"
-flare file.swf
-cat file.flr
+	cp "$1" "$tmp/file.swf"
+	cd "$tmp"
+	flare file.swf
+	cat file.flr
+else
+	# propatate usage
+	flare
+fi
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/flare.sh?r1=1.2&r2=1.3&f=u




More information about the pld-cvs-commit mailing list