-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #69 from google/makefile
Makefile cleanup
- Loading branch information
Showing
2 changed files
with
11 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,14 @@ | ||
#!/usr/bin/env python | ||
|
||
# Exit with 1 if any input is provided. Print the input to stdout, unless an | ||
# argument is specified. In that case, also print the argument. | ||
# argument is specified. In that case, print the argument instead. | ||
|
||
import sys | ||
|
||
input_string = sys.stdin.read() | ||
if input_string != "": | ||
sys.stdout.write(input_string) | ||
if len(sys.argv) >= 2: | ||
print(sys.argv[1]) | ||
else: | ||
sys.stdout.write(input_string) | ||
sys.exit(1) |