Permalink
Fetching contributors…
Cannot retrieve contributors at this time
42 lines (39 sloc) 981 Bytes
THISDIR=$PWD
BUNDLE=${THISDIR}/dbKodaSupportBundle.tar
GBUNDLE=${BUNDLE}.gz
if [ -f ${GBUNDLE} ]; then
echo "Deleting existing file ${GBUNDLE}"
rm ${GBUNDLE}
fi
OS=`uname -a|cut -f 1 -d ' '`
if [ ${OS} = 'Darwin' ];then
OSX=1
else
OSX=0
fi
mongo --version >>/tmp/$$.tmp
uname -a >>/tmp/$$.tmp
if [ ${OSX} -eq 1 ]; then
echo "Running on a mac"
#system_profiler -detaillevel mini -timeout 2 >/tmp/$$.tmp
sw_vers >>/tmp/$$.tmp
if [ -d ~/Library/Application\ Support/dbKoda/logs ];then
cd ~/Library/Application\ Support/dbKoda/logs
tar cvf ${BUNDLE} `ls -t |head -6`
fi
else
echo "Running on Linux"
if [ -d ~/.config/dbKoda/logs ];then
cd ~/.config/dbKoda/logs
tar cvf ${BUNDLE} `ls -t |head -6`
fi
fi
if [ -d ~/.dbKoda ];then
cd ~/.dbKoda
tar rvf ${BUNDLE} state* config*
fi
cd /tmp
tar rvf ${BUNDLE} $$.tmp
gzip ${BUNDLE}
echo
echo "Please forward ${GBUNDLE} to support@southbanksoftware.com"