aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAvatar David Leverton <levertond@googlemail.com> 2008-07-02 16:22:43 +0100
committerAvatar David Leverton <levertond@googlemail.com> 2008-07-25 21:37:19 +0100
commitbfbf5f882ac5441b35749880717868624f20df30 (patch)
treea4730bfdc10db25405ef33de3dd3b861e5f0fd4a
parent67b907b14fcb8751d3d1ac4551b760f91560e110 (diff)
downloadpaludis-bfbf5f882ac5441b35749880717868624f20df30.tar.gz
paludis-bfbf5f882ac5441b35749880717868624f20df30.tar.xz
(ruby) Make playman.rb use Environment MetadataKeys to find the config directory.
-rwxr-xr-xruby/demos/playman.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/ruby/demos/playman.rb b/ruby/demos/playman.rb
index 2e9c45a..0825cd8 100755
--- a/ruby/demos/playman.rb
+++ b/ruby/demos/playman.rb
@@ -112,13 +112,12 @@ HELP
end
end
-if ($envspec || "") =~ /^(?:paludis)?(?::(.*))?$/ then
- $env = Paludis::PaludisEnvironment.new($1 || "")
- $config_dir = $env.config_dir
-else
+$env = EnvironmentMaker.instance.make_from_spec($envspec || "")
+if $env.format_key.value != "paludis" then
$stderr.puts "#$0: --environment must specify class 'paludis'"
exit 1
end
+$config_dir = $env.config_location_key.value
if $mode.empty?
$stderr.puts "You must choose a mode of operation."