Skip to content

Instantly share code, notes, and snippets.

@robin13
Last active August 29, 2015 14:24
Show Gist options
  • Save robin13/de8dae5fffe810d19dd9 to your computer and use it in GitHub Desktop.
Save robin13/de8dae5fffe810d19dd9 to your computer and use it in GitHub Desktop.
#!/bin/sh
#TMPDIR=`mktemp -d`
TMPDIR=/tmp/zoom-report
ZOOM_LOGS=~/.zoom/logs
rm -rf $TMPDIR
mkdir $TMPDIR
sudo lshw > $TMPDIR/lshw.txt
uname -a > $TMPDIR/uname.txt
dpkg -l | grep '^ii' > $TMPDIR/dpkg-install-list.txt
LAST_RUN_ID=$(ls -tr $ZOOM_LOGS | grep cptshare | tail -n 1 | perl -lne '/.*\-(\d+)\-as.*?/; print $1')
echo "Last run: $LAST_RUN_ID"
cp $ZOOM_LOGS/cptshare-*${LAST_RUN_ID}* $TMPDIR
cp $ZOOM_LOGS/zoom_${LAST_RUN_ID}_*.log $TMPDIR
cp $ZOOM_LOGS/zoom_*_${LAST_RUN_ID}.log $TMPDIR
CDDIR=$(dirname $TMPDIR)
TARGET=$CDDIR/zoom-report.tar.gz
tar -C $CDDIR -czf $TARGET `basename $TMPDIR`
rm -rf $TMPDIR
ls -alh $TARGET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment