[csw-devel] SF.net SVN: opencsw:[553] gar-wrapper
skayser at users.sourceforge.net
skayser at users.sourceforge.net
Sat Sep 24 17:59:14 CEST 2011
Revision: 553
http://opencsw.svn.sourceforge.net/opencsw/?rev=553&view=rev
Author: skayser
Date: 2011-09-24 15:59:13 +0000 (Sat, 24 Sep 2011)
Log Message:
-----------
mgar: fix tab hickups with ~/.garrc
Modified Paths:
--------------
gar-wrapper/CHANGES
gar-wrapper/mgar
Modified: gar-wrapper/CHANGES
===================================================================
--- gar-wrapper/CHANGES 2011-09-24 14:18:19 UTC (rev 552)
+++ gar-wrapper/CHANGES 2011-09-24 15:59:13 UTC (rev 553)
@@ -8,6 +8,7 @@
* CHANGE "locate" will update the index if it's older than 14 days
* FIX "index" now properly encodes file paths with special signs (e.g. '+')
* FIX "init-existing" now properly removes obsolete gar/ symlinks
+* FIX ~/.garrc variable assignments couldn't cope with tabs (Rafael Ostertag)
Changes with 0.93 (r543):
* NEW command "show-var" to show runtime value of recipe vars (Maciej Blizinski)
Modified: gar-wrapper/mgar
===================================================================
--- gar-wrapper/mgar 2011-09-24 14:18:19 UTC (rev 552)
+++ gar-wrapper/mgar 2011-09-24 15:59:13 UTC (rev 553)
@@ -115,13 +115,19 @@
function read_config_value {
local __param=$1
+ local __val=""
+
[ -f ~/.garrc ] || die_config_missing
- ggrep -E "^$__param *=" ~/.garrc | tail -1 | cut -d= -f2 | sed -e 's/^ *//'
+ __val=`ggrep -E "^$__param\s*=" ~/.garrc | tail -1 | cut -d= -f2`
+ echo ${__val} # strips leading whitespace (spaces and tabs)
}
function read_makefile_value {
local __param=$1
- ggrep -E "^$__param *=" Makefile | tail -1 | cut -d= -f2 | sed -e 's/^ *//'
+ local __val=""
+
+ __val=`ggrep -E "^$__param\s*=" Makefile | tail -1 | cut -d= -f2`
+ echo ${__val} # strips leading whitespace (spaces and tabs)
}
function die_config_missing {
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