From 5b3406fee29f11400ef6bb7337d5009d2331fd41 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Wed, 9 May 2007 17:01:33 +0000 Subject: - allow adding local media without file:// (#27291) - update usage accordingly - do not mention "... with hdlist" in usage (it's deprecated) --- gurpmi.addmedia | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'gurpmi.addmedia') diff --git a/gurpmi.addmedia b/gurpmi.addmedia index 3920baf4..b9b8d332 100755 --- a/gurpmi.addmedia +++ b/gurpmi.addmedia @@ -28,11 +28,12 @@ BEGIN { @ARGV == 0 || "@ARGV" =~ /-h/ and do { print "usage: gurpmi.addmedia [options] [with ] where is one of - file:// - ftp://:@/ with - ftp:/// with - http:/// with - removable:// + [file:/]/ + ftp://:\@/ + ftp:/// + http:/// + removable:// + and [options] are from --update create an update medium. --silent-success don't show popup window on success @@ -78,7 +79,12 @@ my @names; while (@ARGV) { my ($name, $url, $with, $with_hdlist) = @ARGV; $with eq 'with' or ($with, $with_hdlist) = (undef, undef); - if ($url !~ m,^(file://|ftp://|http://|removable://), || $with && !$with_hdlist) { + if ($url !~ m,^(([^:]*):/)?/,) { + interactive_msg('gurpmi.addmedia', + N("bad (for local directory, the path must be absolute)")); + myexit(-1); + } + if ($with && !$with_hdlist) { interactive_msg('gurpmi.addmedia', N("Unable to add medium, wrong or missing arguments")); myexit(-1); -- cgit v1.2.1