Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/commands
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-11-16 14:24:40 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-11-16 14:24:40 (GMT)
commit07f237ba496428453896cdfaf9973c1a0590e10f (patch)
tree2136dd5e689afac3853249e47a817cff97fecc4a /commands
parent4ffa3068a14518f07a0c100521413a9c7bcbaae5 (diff)
Cleanup makefiles
Diffstat (limited to 'commands')
-rwxr-xr-xcommands/clean21
-rw-r--r--commands/common.py1
2 files changed, 22 insertions, 0 deletions
diff --git a/commands/clean b/commands/clean
index fc29466..5fdee2f 100755
--- a/commands/clean
+++ b/commands/clean
@@ -1,8 +1,29 @@
#!/usr/bin/python
+import glob
+import os
+
import common
from devbot import build
+from devbot import config
common.setup()
build.clean()
+
+os.chdir(config.logs_dir)
+
+print "Deleting logs"
+
+try:
+ os.unlink("all-logs.tar.bz2")
+except OSError:
+ # Migth not exist
+ pass
+
+for filename in glob.glob("*.log"):
+ try:
+ os.unlink(filename)
+ except OSError:
+ # Files migth not exist
+ pass
diff --git a/commands/common.py b/commands/common.py
index 563783f..4197912 100644
--- a/commands/common.py
+++ b/commands/common.py
@@ -14,3 +14,4 @@ def setup():
config.set_source_dir(os.path.join(base_path, "source"))
config.set_build_dir(os.path.join(base_path, "build"))
config.set_commands_dir(os.path.join(base_path, "commands"))
+ config.set_logs_dir(os.path.join(base_path, "logs"))