mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-04-25 20:41:19 -05:00
21 lines
701 B
Python
Executable File
21 lines
701 B
Python
Executable File
#!/usr/bin/env python3
|
|
# Refresh shared modules so that PluginDownloader downloads don't break.
|
|
|
|
CONFIG = {'accountsdb.py': ('LastFM/local', 'NuWeather/local')}
|
|
|
|
import os
|
|
import time
|
|
|
|
for filename, paths in CONFIG.items():
|
|
with open(filename) as f:
|
|
data = f.read()
|
|
for path in paths:
|
|
target = os.path.join(path, filename)
|
|
if os.path.exists(target):
|
|
print("Deleting existing %s" % target)
|
|
os.remove(target)
|
|
print("Writing %s => %s" % (filename, target))
|
|
with open(target, 'w') as wf:
|
|
wf.write('# Autogenerated by update-modules.py on %s - DO NOT EDIT THIS COPY DIRECTLY!\n' % time.ctime())
|
|
wf.write(data)
|