./ctl setup

This commit is contained in:
j 2014-05-17 16:31:05 +02:00
parent 6a8a7b956d
commit 660512e38f
2 changed files with 8 additions and 7 deletions

1
ctl
View File

@ -83,7 +83,6 @@ if [ "$1" == "update" ]; then
git pull
cd $BASE/$NAME
git pull
$0 db upgrade
$0 setup
$0 update_static > /dev/null
exit

View File

@ -2,14 +2,22 @@
# vi:si:et:sw=4:sts=4:ts=4
from __future__ import division
import subprocess
import os
from flask.ext.script import Command
def r(*cmd):
print ' '.join(cmd)
return subprocess.call(cmd)
class Setup(Command):
"""
setup new node
"""
def run(self):
r('./ctl', 'db', 'upgrade')
import setup
import settings
setup.create_default_lists()
@ -21,14 +29,8 @@ class UpdateStatic(Command):
setup new node
"""
def run(self):
import subprocess
import os
import settings
def r(*cmd):
print ' '.join(cmd)
return subprocess.call(cmd)
oxjs = os.path.join(settings.static_path, 'oxjs')
if not os.path.exists(oxjs):
r('git', 'clone', 'https://git.0x2620.org/oxjs.git', oxjs)