mirror of
https://github.com/oDinZu/callirhoe.git
synced 2025-02-22 00:04:52 -05:00
Remake of "make_resources_list" which is a dict actually and not a list. Hm...
git-svn-id: https://callirhoe.googlecode.com/svn/branches/phantome@180 81c8bb96-aa45-f2e2-0eef-c4fa4a15c6df
This commit is contained in:
parent
c87b9f3146
commit
3a50df8572
@ -1,10 +1,15 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/env python2
|
||||
import glob
|
||||
|
||||
echo -n resource_list = { \"lang\" : [
|
||||
find ./lang | grep '.py' | sed 's/\.\//"\//' | sed 's/$/"/' | tr '\n' ',' | sed 's/.$/], /'
|
||||
echo -n \"layouts\" : [
|
||||
find ./layouts | grep '.py' | sed 's/\.\//"\//' | sed 's/$/"/' | tr '\n' ',' | sed 's/.$/], /'
|
||||
echo -n \"style\" : [
|
||||
find ./style | grep '.py' | sed 's/\.\//"\//' | sed 's/$/"/' | tr '\n' ',' | sed 's/.$/], /'
|
||||
echo -n \"geom\" : [
|
||||
find ./geom | grep '.py' | sed 's/\.\//"\//' | sed 's/$/"/' | tr '\n' ',' | sed 's/.$/]}/'
|
||||
lang = glob.glob('lang/*.py')
|
||||
style = glob.glob('style/*.py')
|
||||
layouts = glob.glob('layouts/*.py')
|
||||
geom = glob.glob('geom/*.py')
|
||||
|
||||
out = open('resources.py', 'w')
|
||||
out.write('resource_list = { ')
|
||||
out.write('"lang" : ' + str(lang) + ', ')
|
||||
out.write('"style" : ' + str(style)+ ', ')
|
||||
out.write('"layouts" : ' + str(layouts) + ', ')
|
||||
out.write('"geom" :' + str(geom) + ' }')
|
||||
out.close()
|
||||
|
Loading…
x
Reference in New Issue
Block a user