- cmds = ''
- ext = ''
- if sys.platform == "win32":
- if os.path.exists(self.parent().fichierOut):
- cmds += 'del %s\n' % self.parent().fichierOut
- ext = '.bat'
- else:
- cmds += '#!/bin/bash\n'
- cmds += 'pwd\n'
- #cmds += 'which mg-cleaner.exe\n'
- cmds += 'echo "DISTENE_LICENSE_FILE="$DISTENE_LICENSE_FILE\n'
- cmds += 'echo "DLIM8VAR="$DLIM8VAR\n'
- cmds += 'rm -f %s\n' % self.parent().fichierOut
- ext = '.bash'
-
- cmds += 'echo %s\n' % txt #to see what is compute command
- cmds += txt+'\n'
- cmds += 'echo "END_OF_MGCleaner"\n'
-
- nomFichier = os.path.splitext(self.parent().fichierOut)[0] + ext
- with open(nomFichier, 'w') as f:
- f.write(cmds)
- self.make_executable(nomFichier)
-
- if verbose: print(("INFO: MGCleaner launch script file: %s" % nomFichier))