diff options
-rw-r--r-- | .gitignore | 4 | ||||
-rwxr-xr-x | commands/build | 5 | ||||
-rwxr-xr-x | commands/clean | 9 | ||||
-rw-r--r-- | devbot/config.py | 2 | ||||
-rw-r--r-- | logs/README | 1 |
5 files changed, 12 insertions, 9 deletions
@@ -4,9 +4,7 @@ home/ install/ build/ source/ -logs/*.log -logs/*.tar -logs/all-logs.tar.bz2 +logs/ commands/helpers/list-outputs commands/helpers/find-free-display commands/helpers/xephyr-window diff --git a/commands/build b/commands/build index b90f0fa..6c06133 100755 --- a/commands/build +++ b/commands/build @@ -2,10 +2,13 @@ commandsdir=`dirname "$0"` rootdir=`dirname "$commandsdir"` +logsdir=$rootdir/logs helpersdir=$commandsdir/helpers timestamp=`date +%Y%m%d-%H%M%S` -logfile=$rootdir/logs/build-$timestamp.log +logfile=$logsdir/build-$timestamp.log + +mkdir -p $logsdir PYTHONPATH=$commandsdir $helpersdir/build | tee -a $logfile diff --git a/commands/clean b/commands/clean index fcfe193..2fa1d61 100755 --- a/commands/clean +++ b/commands/clean @@ -12,10 +12,6 @@ from devbot import state from devbot import config common.setup() -build.clean() -environ.clean() -state.clean() -config.clean() os.chdir(config.logs_dir) @@ -33,3 +29,8 @@ for filename in glob.glob("*.log"): except OSError: # Files migth not exist pass + +build.clean() +environ.clean() +state.clean() +config.clean() diff --git a/devbot/config.py b/devbot/config.py index 63140e8..df037d6 100644 --- a/devbot/config.py +++ b/devbot/config.py @@ -52,6 +52,7 @@ def set_config_dir(dir): def set_logs_dir(dir): global logs_dir logs_dir = dir + _ensure_dir(logs_dir) def set_home_dir(dir): global home_dir @@ -205,5 +206,6 @@ def load_modules(): def clean(): try: os.rmdir(home_dir) + os.rmdir(logs_dir) except OSError: pass diff --git a/logs/README b/logs/README deleted file mode 100644 index 93cc99d..0000000 --- a/logs/README +++ /dev/null @@ -1 +0,0 @@ -Build logs |