added reporting of files altered by the script
This commit is contained in:
parent
a7d9d711f6
commit
37807ff6ca
|
@ -69,6 +69,7 @@ parser.set_defaults(shell = 'bash')
|
||||||
(options, args) = parser.parse_args()
|
(options, args) = parser.parse_args()
|
||||||
|
|
||||||
pathInfo = {}
|
pathInfo = {}
|
||||||
|
hitSomething = False
|
||||||
|
|
||||||
DamaskRoot = os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])),'../'))
|
DamaskRoot = os.path.normpath(os.path.join(os.path.dirname(os.path.realpath(sys.argv[0])),'../'))
|
||||||
try: # check for user-defined pathinfo
|
try: # check for user-defined pathinfo
|
||||||
|
@ -90,6 +91,8 @@ if theShell == 'bash':
|
||||||
for theRC in validShells[theShell]:
|
for theRC in validShells[theShell]:
|
||||||
thePath = os.path.join(theHome,theRC)
|
thePath = os.path.join(theHome,theRC)
|
||||||
if os.path.exists(thePath):
|
if os.path.exists(thePath):
|
||||||
|
print thePath
|
||||||
|
hitSomething = True
|
||||||
rc = open(os.path.join(theHome,theRC))
|
rc = open(os.path.join(theHome,theRC))
|
||||||
content = map(string.strip,rc.readlines())
|
content = map(string.strip,rc.readlines())
|
||||||
rc.close()
|
rc.close()
|
||||||
|
@ -144,3 +147,5 @@ if theShell == 'bash':
|
||||||
|
|
||||||
elif theShell == 'csh':
|
elif theShell == 'csh':
|
||||||
print 'csh not supported yet...'
|
print 'csh not supported yet...'
|
||||||
|
|
||||||
|
if not hitSomething: print 'no %s found..!'%(', '.join(validShells[theShell]))
|
||||||
|
|
Loading…
Reference in New Issue