[csw-devel] SF.net SVN: gar:[11136] csw/mgar/pkg/alternatives/trunk/alternatives
theferret at users.sourceforge.net
theferret at users.sourceforge.net
Sun Oct 3 18:42:47 CEST 2010
Revision: 11136
http://gar.svn.sourceforge.net/gar/?rev=11136&view=rev
Author: theferret
Date: 2010-10-03 16:42:47 +0000 (Sun, 03 Oct 2010)
Log Message:
-----------
alternatives: added comment, and minor optimization
Modified Paths:
--------------
csw/mgar/pkg/alternatives/trunk/alternatives
Modified: csw/mgar/pkg/alternatives/trunk/alternatives
===================================================================
--- csw/mgar/pkg/alternatives/trunk/alternatives 2010-10-03 15:16:20 UTC (rev 11135)
+++ csw/mgar/pkg/alternatives/trunk/alternatives 2010-10-03 16:42:47 UTC (rev 11136)
@@ -64,7 +64,7 @@
return
fi
# I hate using cat, but its the only way to avoid nawk throwing a fit.
- cat $PRIORITIESDIR/* $MANUALDIR/* 2>/dev/null |
+ cat $PRIORITIESDIR/* $MANUALDIR/$1 2>/dev/null |
$AWK ' BEGIN {save=""}
$2 == "'$1'" {if($4 > highest){
save=$0;
@@ -205,6 +205,8 @@
}
# set_alternatives: mostly internal function.
+# It "sets" only in the sense of making the symlink for the binary(s)
+#
# Usage: set_alternative {shortname} [ignore-path]
#
# Goes and checks both standard configs, and manual config, for best fit.
@@ -323,6 +325,9 @@
$DEBUG found match for $1: $check
rm -f $MANUALDIR/$1
ln -s $check $MANUALDIR/$1
+ # I use a symlink, so that way, the manual set does not take
+ # effect if the package has been removed.. but it is remembered
+ # if the package is coming right back, hopefully.
set_alternative $1
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list