diff options
Diffstat (limited to 'tools/normalize_path.py')
-rwxr-xr-x | tools/normalize_path.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/normalize_path.py b/tools/normalize_path.py index 1b3d42e64c..6c4d5486dc 100755 --- a/tools/normalize_path.py +++ b/tools/normalize_path.py @@ -14,11 +14,16 @@ # See the License for the specific language governing permissions and # limitations under the License. """ -Normalize and output paths read from stdin. +Normalize and output paths from arguments, or stdin if no arguments provided. """ import os.path import sys +if len(sys.argv) > 1: + for p in sys.argv[1:]: + print os.path.normpath(p) + sys.exit(0) + for line in sys.stdin: print os.path.normpath(line.strip()) |