Last active
March 14, 2018 20:01
-
-
Save colomon/d358b768442a8e78dfd6814a61b45ff8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
my $files-file = "files.list"; | |
my $zip-name = "for-abc-" ~ Date.new(now) ~ ".zip"; | |
my $zip = Proc::Async.new(:w, 'zip', $zip-name, '-@'); | |
my $promise = $zip.start; | |
for $files-file.IO.lines() -> $line { | |
await $zip.say: $line; | |
} | |
$zip.close-stdin; | |
await $promise; | |
$zip-name.IO.copy("/Users/colomon/Google Drive/ABC Work/" ~ $zip-name); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment