./ctl setup
This commit is contained in:
parent
6a8a7b956d
commit
660512e38f
2 changed files with 8 additions and 7 deletions
1
ctl
1
ctl
|
@ -83,7 +83,6 @@ if [ "$1" == "update" ]; then
|
||||||
git pull
|
git pull
|
||||||
cd $BASE/$NAME
|
cd $BASE/$NAME
|
||||||
git pull
|
git pull
|
||||||
$0 db upgrade
|
|
||||||
$0 setup
|
$0 setup
|
||||||
$0 update_static > /dev/null
|
$0 update_static > /dev/null
|
||||||
exit
|
exit
|
||||||
|
|
|
@ -2,14 +2,22 @@
|
||||||
# vi:si:et:sw=4:sts=4:ts=4
|
# vi:si:et:sw=4:sts=4:ts=4
|
||||||
from __future__ import division
|
from __future__ import division
|
||||||
|
|
||||||
|
import subprocess
|
||||||
|
import os
|
||||||
|
|
||||||
from flask.ext.script import Command
|
from flask.ext.script import Command
|
||||||
|
|
||||||
|
def r(*cmd):
|
||||||
|
print ' '.join(cmd)
|
||||||
|
return subprocess.call(cmd)
|
||||||
|
|
||||||
|
|
||||||
class Setup(Command):
|
class Setup(Command):
|
||||||
"""
|
"""
|
||||||
setup new node
|
setup new node
|
||||||
"""
|
"""
|
||||||
def run(self):
|
def run(self):
|
||||||
|
r('./ctl', 'db', 'upgrade')
|
||||||
import setup
|
import setup
|
||||||
import settings
|
import settings
|
||||||
setup.create_default_lists()
|
setup.create_default_lists()
|
||||||
|
@ -21,14 +29,8 @@ class UpdateStatic(Command):
|
||||||
setup new node
|
setup new node
|
||||||
"""
|
"""
|
||||||
def run(self):
|
def run(self):
|
||||||
import subprocess
|
|
||||||
import os
|
|
||||||
import settings
|
import settings
|
||||||
|
|
||||||
def r(*cmd):
|
|
||||||
print ' '.join(cmd)
|
|
||||||
return subprocess.call(cmd)
|
|
||||||
|
|
||||||
oxjs = os.path.join(settings.static_path, 'oxjs')
|
oxjs = os.path.join(settings.static_path, 'oxjs')
|
||||||
if not os.path.exists(oxjs):
|
if not os.path.exists(oxjs):
|
||||||
r('git', 'clone', 'https://git.0x2620.org/oxjs.git', oxjs)
|
r('git', 'clone', 'https://git.0x2620.org/oxjs.git', oxjs)
|
||||||
|
|
Loading…
Reference in a new issue