summaryrefslogtreecommitdiffstats
path: root/urpmi.addmedia
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-07-27 06:06:53 +0000
committerRafael Garcia-Suarez <rgarciasuarez@mandriva.org>2004-07-27 06:06:53 +0000
commit21b7551db1452f05322209b8f4d9c9064e8eefeb (patch)
tree65dd67813c365195cbe866198219613ad8e1c13e /urpmi.addmedia
parentee5df142c4a44ab7bdd50f675f558e7b87713c8d (diff)
downloadurpmi-21b7551db1452f05322209b8f4d9c9064e8eefeb.tar
urpmi-21b7551db1452f05322209b8f4d9c9064e8eefeb.tar.gz
urpmi-21b7551db1452f05322209b8f4d9c9064e8eefeb.tar.bz2
urpmi-21b7551db1452f05322209b8f4d9c9064e8eefeb.tar.xz
urpmi-21b7551db1452f05322209b8f4d9c9064e8eefeb.zip
Make the leading "file://" optional in local media URLs.
Diffstat (limited to 'urpmi.addmedia')
-rwxr-xr-xurpmi.addmedia6
1 files changed, 3 insertions, 3 deletions
diff --git a/urpmi.addmedia b/urpmi.addmedia
index ca73dc57..7e93498a 100755
--- a/urpmi.addmedia
+++ b/urpmi.addmedia
@@ -37,7 +37,7 @@ sub usage {
# Translator: only what is between <brakets> can be translated.
my $usage = N("usage: urpmi.addmedia [options] <name> <url> [with <relative_path>]
where <url> is one of
- file://<path> with <relative filename of hdlist>
+ [file:/]/<path> with <relative filename of hdlist>
ftp://<login>:<password>@<host>/<path> with <relative filename of hdlist>
ftp://<host>/<path> with <relative filename of hdlist>
http://<host>/<path> with <relative filename of hdlist>
@@ -109,7 +109,7 @@ sub main {
#- allow not to give name immediately.
$options{distrib} or $url or ($url, $name) = ($name, '');
- my ($type) = $url =~ m,^([^:]*)://, or $options{distrib} or usage;
+ my ($type) = $url =~ m,^(([^:]*):/)?/, or $options{distrib} or usage;
if ($< != 0) {
$urpm->{fatal}(1, N("Only superuser is allowed to add media"));
@@ -227,7 +227,7 @@ sub main {
}
}
- #- try to umount removable device which may have been mounted.
+ #- try to umount removable devices which may have been mounted.
$urpm->try_umounting_removables;
}