diff --git a/bin/CP b/bin/CP index 6b800e5c..8082b34d 100755 --- a/bin/CP +++ b/bin/CP @@ -4,12 +4,18 @@ # so I converted CP back to perl. :) use File::Basename ; +use Cwd ; use Cwd 'abs_path'; $trick_bin = dirname(abs_path($0)) ; $trick_home = dirname($trick_bin) ; if ( -f "S_define" ) { + if ( not -w "." ) { + print getcwd() , " is not writable\n" ; + print "CP aborted\n" ; + exit 1 ; + } unlink "Makefile_sim", "makefile" ; $makefile_text = do { local $/; } ; $makefile_text =~ s/SUB_TRICK_HOME/$trick_home/ ;