assets.py: use SNEJ_ROOT variable & os.path.join

This commit is contained in:
Colin McMillen 2019-10-03 20:34:17 -04:00
parent af28ee776c
commit fa827a0f30

4
scripts/assets.py Normal file → Executable file
View File

@ -313,7 +313,9 @@ def stitch_sprites(metadata, filename_base):
def main(args): def main(args):
os.chdir(os.path.expanduser('~/snej/assets/time_fantasy')) snej_root = os.environ.get('SNEJ_ROOT', os.path.join('~', 'snej'))
time_fantasy_path = os.path.join(snej_root, 'assets', 'time_fantasy')
os.chdir(os.path.expanduser(time_fantasy_path))
sprite_files = unglob(SPRITE_FILES) sprite_files = unglob(SPRITE_FILES)
tileset_files = unglob(TILESET_FILES) tileset_files = unglob(TILESET_FILES)