the 'FORTUNE_CS_DIR' environment variable now overrides default fortune path
This commit is contained in:
parent
dec2f6ff19
commit
348f59b44d
1 changed files with 4 additions and 1 deletions
|
@ -2,7 +2,10 @@ using System;
|
|||
using System.IO;
|
||||
using System.Security.Cryptography;
|
||||
|
||||
var resourcePath = "/usr/share/fortune-cs/";
|
||||
// get resource path from var or default
|
||||
string resourcePath = Environment.GetEnvironmentVariable("FORTUNE_CS_DIR");
|
||||
if(resourcePath == "" || !Directory.Exists(resourcePath))
|
||||
resourcePath = "/usr/share/fortune-cs/";
|
||||
|
||||
// pull file arg if 1 argument is provided
|
||||
string file = null;
|
||||
|
|
Loading…
Reference in a new issue