checkexists.py 196 B

1234567891011
  1. #!/usr/bin/env python3
  2. import os.path, sys
  3. invert = False
  4. for path in sys.argv[1:]:
  5. if path == '--not':
  6. invert = True
  7. elif not os.path.exists(path) ^ invert:
  8. sys.exit(1)