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 ) {
936936 getcwd (sPatternFile , sizeof (sPatternFile ));
937937 strcat (sPatternFile , "/" PATTERN_FILE );
938938#endif
939+ char * env_coeffs = getenv ("COEFFS_PATH" );
939940
940- coeff_stream = gzopen ( sPatternFile , "rb" );
941+ coeff_stream = gzopen (env_coeffs ? env_coeffs : sPatternFile , "rb" );
941942 if ( coeff_stream == NULL )
942943 fatal_error ( "%s '%s'\n" , FILE_ERROR , sPatternFile );
943944
Original file line number Diff line number Diff line change @@ -609,8 +609,13 @@ main( int argc, char *argv[] ) {
609609 global_setup ( use_random , hash_bits );
610610 init_thor_database ();
611611
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+ }
614619 if ( use_random && !SCRIPT_ONLY ) {
615620 time ( & timer );
616621 my_srandom ( timer );
You can’t perform that action at this time.
0 commit comments