Skip to content

Commit

Permalink
Add support for git URLs on the command line
Browse files Browse the repository at this point in the history
  • Loading branch information
thelema committed Jun 6, 2012
1 parent 3d5abaa commit b361edb
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion odb.ml
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,11 @@ let get_tarball_chk p = (* checks package signature if possible *)

let to_pkg id =
if Sys.file_exists id || is_uri id then
{id=Filename.basename id; props= ["tarball",id;"cli","yes"]}
if Fn.check_suffix id "git" then
{id=Fn.basename id |> Fn.chop_extension;
props = ["git", id; "cli", "yes"]}
else
{id=Fn.basename id; props= ["tarball",id;"cli","yes"]}
else
{id = id; props = get_info id}

Expand Down

0 comments on commit b361edb

Please sign in to comment.