# HG changeset patch # User HackEso # Date 1573767951 0 # Node ID 9a693e54efb14fe1bd145e0de46f3561707c8b79 # Parent 03d43745ff2379edcc485e45195533d132f8ea14 `` /bin/sed -i \'s%"share%($ENV{HACKENV}//"/hackenv")."/share%\' bin/random-card diff -r 03d43745ff23 -r 9a693e54efb1 bin/random-card --- 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"