kov changed gksu/branches/gksu2/ChangeLog,
gksu/branches/gksu2/gksu-migrate-conf.sh
Gustavo Noronha
kov at costa.debian.org
Wed Mar 29 03:23:42 UTC 2006
Mensagem de log:
fix gksu-migrate-conf to not contain bashisms and be more
robust
-----
Modified: gksu/branches/gksu2/ChangeLog
===================================================================
--- gksu/branches/gksu2/ChangeLog 2006-03-29 02:21:39 UTC (rev 522)
+++ gksu/branches/gksu2/ChangeLog 2006-03-29 03:23:41 UTC (rev 523)
@@ -1,3 +1,10 @@
+2006-03-29 Gustavo Noronha Silva <kov at debian.org>
+
+ * gksu-migrate-conf.sh:
+ - remove bash3.0isms, enhance the code that gets the values
+ from the config file to be more robust and work on more
+ possibilities
+
2006-03-28 Gustavo Noronha Silva <kov at debian.org>
* gksu/gksu.c:
Modified: gksu/branches/gksu2/gksu-migrate-conf.sh
===================================================================
--- gksu/branches/gksu2/gksu-migrate-conf.sh 2006-03-29 02:21:39 UTC (rev 522)
+++ gksu/branches/gksu2/gksu-migrate-conf.sh 2006-03-29 03:23:41 UTC (rev 523)
@@ -21,9 +21,9 @@
exit 1
fi
-value=$(grep ^force-grab $CONFFILE | head -1 | cut -d= -f2)
+value=$(grep ^force-grab $CONFFILE | head -1 | cut -d= -f2 | sed 's,#.*,,g' | tr -d '[:space:]' | tr A-Z a-z)
if [ -n "$value" ]; then
- if [[ $value =~ "yes$" ]]; then
+ if [[ $value = "yes" ]]; then
set_mandatory force-grab true
else
echo "Parse error in $CONFFILE for key force-grab"
@@ -31,12 +31,12 @@
fi
for key in disable-grab sudo-mode prompt always-ask-password; do
- value=$(grep ^$key $CONFFILE | head -1 | cut -d= -f2)
+ value=$(grep ^$key $CONFFILE | head -1 | cut -d= -f2 | sed 's,#.*,,g' | tr -d '[:space:]' | tr A-Z a-z)
if [ -n "$value" ]; then
- if [[ $value =~ "yes$" ]]; then
+ if [[ $value = "yes" ]]; then
set_default $key true
- elif [[ $value =~ "no$" ]]; then
+ elif [[ $value = "no" ]]; then
set_default $key false
else
echo "Parse error in $CONFFILE for key $key"
More information about the gksu-commits
mailing list