packages: environment-modules/modules.sh - $() is more readable

glen glen at pld-linux.org
Sun May 9 01:10:00 CEST 2010


Author: glen                         Date: Sat May  8 23:10:00 2010 GMT
Module: packages                      Tag: HEAD
---- Log message:
- $() is more readable

---- Files affected:
packages/environment-modules:
   modules.sh (1.1 -> 1.2) 

---- Diffs:

================================================================
Index: packages/environment-modules/modules.sh
diff -u packages/environment-modules/modules.sh:1.1 packages/environment-modules/modules.sh:1.2
--- packages/environment-modules/modules.sh:1.1	Sat May  8 23:16:30 2010
+++ packages/environment-modules/modules.sh	Sun May  9 01:09:55 2010
@@ -1,6 +1,6 @@
-shell=`/bin/basename \`/bin/ps -p $$ -ocomm=\``
-if [ -f /usr/share/Modules/init/$shell ]
-then
+shell=$(/bin/basename $(/bin/ps -p $$ -ocomm=))
+if [ -f /usr/share/Modules/init/$shell ]; then
+  . /usr/share/Modules/init/$shell
   . /usr/share/Modules/init/$shell
 else
   . /usr/share/Modules/init/sh
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/environment-modules/modules.sh?r1=1.1&r2=1.2&f=u



More information about the pld-cvs-commit mailing list