Update of /cvsroot/alsa/alsa-driver/utils
In directory usw-pr-cvs1:/tmp/cvs-serv18073

Modified Files:
        module-options 
Log Message:
a bit improvement
- compare the new file via cmp and shows the status.
- check the existence of the file before comparing.



Index: module-options
===================================================================
RCS file: /cvsroot/alsa/alsa-driver/utils/module-options,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- module-options      22 Oct 2002 09:07:07 -0000      1.1
+++ module-options      22 Oct 2002 10:17:56 -0000      1.2
@@ -6,6 +6,19 @@
   file=$1
 fi
 
+if [ ! -f $file ]; then
+    echo "file $file not found"
+    exit 1
+fi
+
+rm -f $file.new
 sed -e 's/snd_//g' < $file > $file.new
-diff -u $file $file.new | less
-echo "Please, check and copy $file.new to $file"
+if cmp -s $file $file.new; then
+    # nothing changed
+    rm -f $file.new
+    echo "Nothing to be changed."
+else
+    diff -u $file $file.new | less
+    echo "Please, check and copy $file.new to $file"
+fi
+exit 0



-------------------------------------------------------
This sf.net emial is sponsored by: Influence the future of 
Java(TM) technology. Join the Java Community Process(SM) (JCP(SM)) 
program now. http://ad.doubleclick.net/clk;4699841;7576301;v?
http://www.sun.com/javavote
_______________________________________________
Alsa-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-cvslog

Reply via email to