From 51e2d72c322d8aee6c9bcc6dfc2941abd443fb12 Mon Sep 17 00:00:00 2001 From: Daniel Narvaez Date: Thu, 14 Jun 2012 19:54:16 +0000 Subject: Add a bug-report command This generates logs that will be useful for debugging. --- (limited to 'scripts') 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 ." +echo "Attach the $tarfile file." +echo -- cgit v0.9.1