X-Git-Url: https://de.git.xonotic.org/?p=xonotic%2Fnetradiant.git;a=blobdiff_plain;f=install.py;h=cf0a74ba0a2add810f6a55fa69243df76cb7d91c;hp=7d1807d8c54172e198314b5101d305196bcf546e;hb=2b5ef55c7c51742f63d271e7b77c0b7e6e2ed2e5;hpb=b1bfb19ecd5ec8355065b2028a6de0c850197b2d diff --git a/install.py b/install.py index 7d1807d8..cf0a74ba 100644 --- a/install.py +++ b/install.py @@ -1,48 +1,48 @@ -#!/usr/bin/env python - -import os.path, sys, shutil - -def install_file( path, src_path, f ): - src = os.path.join( src_path, f ) - dst = os.path.join( path, f ) - print '%s -> %s' % ( src, dst ) - shutil.copyfile( src, dst ) - -def install( path, src_path ): - for f in [ 'radiant.exe', 'radiant.pdb' ]: - install_file( path, src_path, f ) - - modules_path = os.path.join( path, 'modules' ) - try: - os.makedirs( modules_path ) - except: - pass - assert( os.path.exists( modules_path ) ) - - modules_src = os.path.join( src_path, 'modules' ) - assert( os.path.exists( modules_src ) ) - - for e in os.listdir( modules_src ): - if ( e[-4:] == '.dll' or e[-4:] == '.pdb' ): - install_file( modules_path, modules_src, e ) - - plugins_path = os.path.join( path, 'plugins' ) - try: - os.makedirs( plugins_path ) - except: - pass - assert( os.path.exists( plugins_path ) ) - - plugins_src = os.path.join( src_path, 'plugins' ) - assert( os.path.exists( plugins_src ) ) - - for e in os.listdir( plugins_src ): - if ( e[-4:] == '.dll' or e[-4:] == '.pdb' ): - install_file( plugins_path, plugins_src, e ) - -if __name__ == '__main__': - if ( len( sys.argv ) <= 2 or not os.path.exists( sys.argv[1] ) or not os.path.exists( sys.argv[2] ) ): - print 'usage: install [target directory] [source directory]' - sys.exit(1) - print 'Install %s into %s' % ( sys.argv[2], sys.argv[1] ) - install( sys.argv[1], sys.argv[2] ) +#!/usr/bin/env python + +import os.path, sys, shutil + +def install_file( path, src_path, f ): + src = os.path.join( src_path, f ) + dst = os.path.join( path, f ) + print '%s -> %s' % ( src, dst ) + shutil.copyfile( src, dst ) + +def install( path, src_path ): + for f in [ 'radiant.exe', 'radiant.pdb' ]: + install_file( path, src_path, f ) + + modules_path = os.path.join( path, 'modules' ) + try: + os.makedirs( modules_path ) + except: + pass + assert( os.path.exists( modules_path ) ) + + modules_src = os.path.join( src_path, 'modules' ) + assert( os.path.exists( modules_src ) ) + + for e in os.listdir( modules_src ): + if ( e[-4:] == '.dll' or e[-4:] == '.pdb' ): + install_file( modules_path, modules_src, e ) + + plugins_path = os.path.join( path, 'plugins' ) + try: + os.makedirs( plugins_path ) + except: + pass + assert( os.path.exists( plugins_path ) ) + + plugins_src = os.path.join( src_path, 'plugins' ) + assert( os.path.exists( plugins_src ) ) + + for e in os.listdir( plugins_src ): + if ( e[-4:] == '.dll' or e[-4:] == '.pdb' ): + install_file( plugins_path, plugins_src, e ) + +if __name__ == '__main__': + if ( len( sys.argv ) <= 2 or not os.path.exists( sys.argv[1] ) or not os.path.exists( sys.argv[2] ) ): + print 'usage: install [target directory] [source directory]' + sys.exit(1) + print 'Install %s into %s' % ( sys.argv[2], sys.argv[1] ) + install( sys.argv[1], sys.argv[2] )