Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
shar: error detected for no files processed (#475)
* Print usage and exit if no file arguments are given (in docs, at least one file argument is required and standard input is not used) * Remove variable $dirty for keeping track of whether header was printed; just print it once before loop * Introduce variable $done to count how many files were processed * Checking $dirty at end of loop was incorrect; this resulted in printing an error on success and exiting with error code * test1: "perl shar" --> no args, usage * test2: "perl shar no-such-file" --> print message "no files were processed" * test3: "perl shar tar" --> archive one file 'tar' successfully
- Loading branch information