File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -936,8 +936,9 @@ init_coeffs( void ) {
936
936
getcwd (sPatternFile , sizeof (sPatternFile ));
937
937
strcat (sPatternFile , "/" PATTERN_FILE );
938
938
#endif
939
+ char * env_coeffs = getenv ("COEFFS_PATH" );
939
940
940
- coeff_stream = gzopen ( sPatternFile , "rb" );
941
+ coeff_stream = gzopen (env_coeffs ? env_coeffs : sPatternFile , "rb" );
941
942
if ( coeff_stream == NULL )
942
943
fatal_error ( "%s '%s'\n" , FILE_ERROR , sPatternFile );
943
944
Original file line number Diff line number Diff line change @@ -609,8 +609,13 @@ main( int argc, char *argv[] ) {
609
609
global_setup ( use_random , hash_bits );
610
610
init_thor_database ();
611
611
612
- if ( use_book )
613
- init_learn ( "book.bin" , TRUE );
612
+ if ( use_book ) {
613
+ char * book_filename = getenv ("BOOK_PATH" );
614
+ if (book_filename == NULL ) {
615
+ book_filename = "book.bin" ;
616
+ }
617
+ init_learn (book_filename , TRUE );
618
+ }
614
619
if ( use_random && !SCRIPT_ONLY ) {
615
620
time ( & timer );
616
621
my_srandom ( timer );
You can’t perform that action at this time.
0 commit comments