aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar Stephen P. Bennett <spb@exherbo.org> 2006-09-21 17:45:54 +0000
committerAvatar Stephen P. Bennett <spb@exherbo.org> 2006-09-21 17:45:54 +0000
commit72f7f59679107e8e33266eb1b24d38d0481cd552 (patch)
tree1d6c88e5bd90de0d20de2c57e4fd890ae0ee95a4
parent0526997ce6ca6641240581ad9334ed179ee87d17 (diff)
downloadpaludis-72f7f59679107e8e33266eb1b24d38d0481cd552.tar.gz
paludis-72f7f59679107e8e33266eb1b24d38d0481cd552.tar.xz
Fix show and set actions
-rw-r--r--eselect/repo.eselect7
1 files changed, 5 insertions, 2 deletions
diff --git a/eselect/repo.eselect b/eselect/repo.eselect
index e62e360..6644e45 100644
--- a/eselect/repo.eselect
+++ b/eselect/repo.eselect
@@ -170,6 +170,8 @@ do_set()
if [[ $# -ge 2 ]]; then
var=$1; shift
store_config ${REPO_CONFIG_FILE} $var "$*"
+ elif [[ $# -eq 1 ]]; then
+ store_config ${REPO_CONFIG_FILE} $1 ""
fi
}
@@ -191,8 +193,9 @@ do_show()
else
vars=( template_root repo_root profiles distdir config_root )
write_list_start "Current configuration variables:"
- for i in $vars; do
- if value=$(load_config ${REPO_CONFIG_FILE} $i); then
+ for i in ${vars[@]}; do
+ value=$(load_config ${REPO_CONFIG_FILE} $i)
+ if [[ -n ${value} ]]; then
write_kv_list_entry $i "${value}"
fi
done