2018-02-28 00:05:39 +01:00
|
|
|
#!/usr/bin/env python
|
2019-07-12 08:46:20 +02:00
|
|
|
from __future__ import (absolute_import, division, print_function)
|
|
|
|
__metaclass__ = type
|
2018-02-28 00:05:39 +01:00
|
|
|
|
|
|
|
import os
|
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
# required by external automated processes and should not be moved, renamed or converted to a symbolic link
|
|
|
|
path = 'examples/scripts/ConfigureRemotingForAnsible.ps1'
|
|
|
|
directory = path
|
|
|
|
|
|
|
|
while True:
|
|
|
|
directory = os.path.dirname(directory)
|
|
|
|
|
|
|
|
if not directory:
|
|
|
|
break
|
|
|
|
|
|
|
|
if not os.path.isdir(directory):
|
|
|
|
print('%s: must be a directory' % directory)
|
|
|
|
|
|
|
|
if os.path.islink(directory):
|
|
|
|
print('%s: cannot be a symbolic link' % directory)
|
|
|
|
|
|
|
|
if not os.path.isfile(path):
|
|
|
|
print('%s: must be a file' % path)
|
|
|
|
|
|
|
|
if os.path.islink(path):
|
|
|
|
print('%s: cannot be a symbolic link' % path)
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == '__main__':
|
|
|
|
main()
|