Skip to content

Commit

Permalink
add gem files support
Browse files Browse the repository at this point in the history
  • Loading branch information
melezhik committed Jan 1, 2017
1 parent c079f01 commit 20b3d06
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion META.info
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"perl" : "6.*",
"name" : "Sparrowdo::Archive",
"version" : "*",
"description" : "Extract various archives using tar/unzip programs",
"description" : "Extract archived files with the help of various archivers programs.",
"authors" : [ "Alexey Melezhik"],
"depends" : [
"Sparrowdo"
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# SYNOPSIS

Extract various archives using tar/unzip programs.
Extract archived files with the help of various archivers programs.

Archive formats supported:

Expand All @@ -10,6 +10,7 @@ Archive formats supported:
| *.zip | unzip |
| *.tar | tar |
| *.tar.gz | tar |
| *.gem | gem |
+-----------+---------------------------+

# INSTALL
Expand Down
4 changes: 4 additions & 0 deletions lib/Sparrowdo/Archive.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ our sub tasks (%args) {
$command = %args<verbose> ??
'unzip -v -o -u ' ~ %args<source> ~ ' -d ' ~ %args<target> !!
'unzip -o -u ' ~ %args<source> ~ ' -d ' ~ %args<target>;
} elsif $ext eq 'gem' {
$command = %args<verbose> ??
'gem unpack ' ~ %args<source> ~ ' -V --target ' ~ %args<target> !!
'gem unpack ' ~ %args<source> ~ ' --target ' ~ %args<target>;
}else {
die 'unknown file extension ' ~ %args<source>.IO.extension
}
Expand Down

0 comments on commit 20b3d06

Please sign in to comment.