@@ -163,17 +163,6 @@ def exit_with_error(msg):
163
163
164
164
165
165
def os_name ():
166
- if WINDOWS :
167
- return 'win'
168
- elif LINUX :
169
- return 'linux'
170
- elif MACOS :
171
- return 'macos'
172
- else :
173
- raise Exception ('unknown OS' )
174
-
175
-
176
- def os_name_for_emscripten_releases ():
177
166
if WINDOWS :
178
167
return 'win'
179
168
elif LINUX :
@@ -491,20 +480,6 @@ def sdk_path(path):
491
480
return to_unix_path (os .path .join (emsdk_path (), path ))
492
481
493
482
494
- # Modifies the given file in-place to contain '\r\n' line endings.
495
- def file_to_crlf (filename ):
496
- text = open (filename , 'r' ).read ()
497
- text = text .replace ('\r \n ' , '\n ' ).replace ('\n ' , '\r \n ' )
498
- open (filename , 'wb' ).write (text )
499
-
500
-
501
- # Modifies the given file in-place to contain '\n' line endings.
502
- def file_to_lf (filename ):
503
- text = open (filename , 'r' ).read ()
504
- text = text .replace ('\r \n ' , '\n ' )
505
- open (filename , 'wb' ).write (text )
506
-
507
-
508
483
# Removes a single file, suppressing exceptions on failure.
509
484
def rmfile (filename ):
510
485
debug_print ('rmfile(' + filename + ')' )
@@ -514,13 +489,6 @@ def rmfile(filename):
514
489
pass
515
490
516
491
517
- def fix_lineendings (filename ):
518
- if WINDOWS :
519
- file_to_crlf (filename )
520
- else :
521
- file_to_lf (filename )
522
-
523
-
524
492
# http://stackoverflow.com/questions/600268/mkdir-p-functionality-in-python
525
493
def mkdir_p (path ):
526
494
debug_print ('mkdir_p(' + path + ')' )
@@ -2200,7 +2168,7 @@ def get_emscripten_releases_tot():
2200
2168
# that does.
2201
2169
for release in recent_releases :
2202
2170
url = emscripten_releases_download_url_template % (
2203
- os_name_for_emscripten_releases (),
2171
+ os_name (),
2204
2172
release ,
2205
2173
'tbz2' if not WINDOWS else 'zip'
2206
2174
)
0 commit comments