projects
/
ssic.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Make executable.
[ssic.git]
/
src
/
ssic.pl
diff --git
a/src/ssic.pl
b/src/ssic.pl
old mode 100644
(file)
new mode 100755
(executable)
index
5cc04ef
..
750c77b
--- a/
src/ssic.pl
+++ b/
src/ssic.pl
@@
-112,7
+112,7
@@
sub compile
my $var_value;
if ($input eq $output and $input ne "-") {
my $var_value;
if ($input eq $output and $input ne "-") {
-
error(4,
"Input and output files are equal\n");
+
warning(
"Input and output files are equal\n");
}
if ($input eq "-") {
}
if ($input eq "-") {
@@
-127,8
+127,8
@@
sub compile
if ($output eq "-") {
$output_fh = *STDOUT;
} else {
if ($output eq "-") {
$output_fh = *STDOUT;
} else {
- if (not open($output_fh, ">", $output)) {
- error(4, "%s: %s\n", $output, $!);
+ if (not open($output_fh, ">", $output
. "~"
)) {
+ error(4, "%s: %s\n", $output
. "~"
, $!);
}
}
}
}
@@
-159,6
+159,10
@@
sub compile
if ($output ne "-") {
close($output_fh);
}
if ($output ne "-") {
close($output_fh);
}
+
+ if (not rename($output . "~", $output)) {
+ error(4, "%s: %s\n", $output, $!);
+ }
}
main();
}
main();