Media URLs with ids in them are now like /u/cwebber/m/id:4112/ rather than /u/cwebber...
[mediagoblin.git] / mediagoblin / gmg_commands / theme.py
index 95594f00039306feb49cec9ef2adf10f2f2642db..71abb982f2e56952bf120ecb373cb567baca4cdb 100644 (file)
@@ -50,7 +50,7 @@ def link_assets(theme, link_dir, printer=simple_printer):
     which should be printable.
     """
     link_dir = link_dir.rstrip(os.path.sep)
-    link_parent_dir = os.path.split(link_dir.rstrip(os.path.sep))[0]
+    link_parent_dir = os.path.dirname(link_dir)
 
     results = []
 
@@ -87,8 +87,8 @@ def link_assets(theme, link_dir, printer=simple_printer):
         theme['assets_dir'], link_dir))
 
 
-def install_theme():
-    pass
+def install_theme(install_dir, themefile):
+    pass # TODO ;)
 
 
 #############
@@ -109,6 +109,8 @@ def install_command(args):
     Handle the 'install this theme' subcommand
     """
     global_config, app_config = setup_global_and_app_config(args.conf_file)
+    install_dir = app_config['theme_install_dir']
+    install_theme(install_dir, args.themefile)
 
 
 SUBCOMMANDS = {