Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorDaniel Narvaez <dwnarvaez@gmail.com>2012-06-14 19:54:16 (GMT)
committer Daniel Narvaez <dwnarvaez@gmail.com>2012-06-14 19:54:53 (GMT)
commit51e2d72c322d8aee6c9bcc6dfc2941abd443fb12 (patch)
treeb8b7808fcb679228b01b06e61368c1a38c114631 /scripts
parentb3d05dd224ee8d01307e2e079f6955b9581df90c (diff)
Add a bug-report command
This generates logs that will be useful for debugging.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/bug-report26
1 files changed, 26 insertions, 0 deletions
diff --git a/scripts/bug-report b/scripts/bug-report
new file mode 100755
index 0000000..05f02ec
--- /dev/null
+++ b/scripts/bug-report
@@ -0,0 +1,26 @@
+#!/bin/sh
+
+scriptsdir=`dirname "$0"`
+rootdir=`dirname "$scriptsdir"`
+buildlogsdir=$rootdir/logs
+sugarlogsdir=~/.sugar/default/logs
+tarfile=$buildlogsdir/all-logs.tar.bz2
+
+tarcommand="tar cfj $tarfile"
+
+if [ -d $buildlogsdir ]; then
+ buildlogs=`cd $buildlogsdir; find *.log`
+ tarcommand="$tarcommand -C $buildlogsdir $buildlogs"
+fi
+
+if [ -d $sugarlogsdir ]; then
+ sugarlogs=`cd $sugarlogsdir; find *.log`
+ tarcommand="$tarcommand -C $sugarlogsdir $sugarlogs"
+fi
+
+$tarcommand
+
+echo
+echo "Send an email to Daniel Narvaez <dwnarvaez@gmail.com>."
+echo "Attach the $tarfile file."
+echo