<s> """<STR_LIT>""" <EOL> import os <EOL> from fabric . api import * <EOL> from fabric . contrib . files import * <EOL> from cloudbio . custom import shared <EOL> def _freenx_scripts ( env ) : <EOL> """<STR_LIT>""" <EOL> home_dir = env . safe_run_output ( "<STR_LIT>" ) <EOL> setup_script = "<STR_LIT>" <EOL> bin_dir = shared . _get_bin_dir ( env ) <EOL> install_file_dir = os . path . join ( env . config_dir , os . pardir , "<STR_LIT>" ) <EOL> if not env . safe_exists ( os . path . join ( bin_dir , setup_script ) ) : <EOL> env . safe_put ( os . path . join ( install_file_dir , setup_script ) , <EOL> os . path . join ( home_dir , setup_script ) ) <EOL> env . safe_run ( "<STR_LIT>" % os . path . join ( home_dir , setup_script ) ) <EOL> env . safe_sudo ( "<STR_LIT>" % ( os . path . join ( home_dir , setup_script ) , bin_dir ) ) <EOL> remote_login = "<STR_LIT>" <EOL> if not env . safe_exists ( os . path . join ( home_dir , remote_login ) ) : <EOL> env . safe_put ( os . path . join ( install_file_dir , '<STR_LIT>' ) , os . path . join ( home_dir , remote_login ) ) <EOL> env . safe_run ( "<STR_LIT>" % os . path . join ( home_dir , remote_login ) ) <EOL> _configure_gnome ( env ) <EOL> def _cleanup_space ( env ) : <EOL> """<STR_LIT>""" <EOL> env . logger . info ( "<STR_LIT>" ) <EOL> with settings ( warn_only = True ) : <EOL> env . safe_sudo ( "<STR_LIT>" ) <EOL> env . safe_sudo ( "<STR_LIT>" ) <EOL> env . safe_run ( "<STR_LIT>" ) <EOL> env . safe_run ( "<STR_LIT>" ) <EOL> def _configure_gnome ( env ) : <EOL> """<STR_LIT>""" <EOL> add = '<STR_LIT>' <EOL> fname = "<STR_LIT>" <EOL> if env . safe_exists ( "<STR_LIT>" ) : <EOL> env . safe_append ( fname , add , use_sudo = True ) </s>
