SOURCES: browser-plugins-update.sh - more errorchecking

glen glen at pld-linux.org
Sat Sep 16 14:46:08 CEST 2006


Author: glen                         Date: Sat Sep 16 12:46:08 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- more errorchecking

---- Files affected:
SOURCES:
   browser-plugins-update.sh (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: SOURCES/browser-plugins-update.sh
diff -u SOURCES/browser-plugins-update.sh:1.2 SOURCES/browser-plugins-update.sh:1.3
--- SOURCES/browser-plugins-update.sh:1.2	Sat Sep 16 14:38:27 2006
+++ SOURCES/browser-plugins-update.sh	Sat Sep 16 14:46:03 2006
@@ -62,7 +62,13 @@
 # returns plugin directory for browser
 browserplugindir() {
 	local browser="$1"
-	readlink "$browsersdir/$browser"
+	local dir
+	dir=$(readlink "$browsersdir/$browser")
+	if [ -z "$dir" ]; then
+		echo >&2 "$0: browser plugin dir empty for $browser; exiting!"
+		exit 1
+	fi
+	echo "$dir"
 }
 
 remove_plugins() {
================================================================

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



More information about the pld-cvs-commit mailing list