Mercurial > repo
changeset 12019:9a693e54efb1 draft
<b_jonas> `` /bin/sed -i \'s%"share%($ENV{HACKENV}//"/hackenv")."/share%\' bin/random-card
author | HackEso <hackeso@esolangs.org> |
---|---|
date | Thu, 14 Nov 2019 21:45:51 +0000 |
parents | 03d43745ff23 |
children | 9b7441dadcb5 |
files | bin/random-card |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/bin/random-card Thu Nov 14 21:44:59 2019 +0000 +++ b/bin/random-card Thu Nov 14 21:45:51 2019 +0000 @@ -1,2 +1,2 @@ #!/bin/sh -exec perl -e'open$I,"<","share/mtg/allsets.txt"or die$!;$/=""; @c=grep{/(?mi:$ARGV[0])/}<$I>; print($c[rand(@c)] || "No card found.");' -- "$1" +exec perl -e'open$I,"<",($ENV{HACKENV}//"/hackenv")."/share/mtg/allsets.txt"or die$!;$/=""; @c=grep{/(?mi:$ARGV[0])/}<$I>; print($c[rand(@c)] || "No card found.");' -- "$1"