Last active
May 9, 2018 16:36
-
-
Save chihchun/bb7d4286e97ac3f4daab7e96bc427bd2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| echo "Please enter password to install testing tools" | |
| sudo apt-get install -y coreutils mtr-tiny gist curl | |
| OUTPUT=$(/bin/mktemp /tmp/SNAPDEBUG.XXXX.txt) | |
| { | |
| set -x | |
| cd /tmp | |
| date -R | |
| lsb_release -a | |
| snap version | |
| snap changes | |
| snap whoami | |
| # test routing to API server | |
| curl -v --silent http://geoip.ubuntu.com/lookup | |
| mtr --report-wide api.snapcraft.io | |
| SNAPD_DEBUG=1 SNAPD_DEBUG_HTTP=9 snap download hello | |
| SNAPD_DEBUG=1 SNAPD_DEBUG_HTTP=9 snap download core | |
| } 2>&1 | tee ${OUTPUT} | |
| echo -n "Press y to upload to gist or press n to save result txt file: " | |
| read ans | |
| if [ $ans == "y" ] ; then | |
| gist-paste -p ${OUTPUT} | |
| else | |
| echo "Please send ${OUTPUT} to Canonical" | |
| fi | |
| # Clean up the downloads | |
| rm -fv hello*.snap hello*.assert | |
| rm -fv core*.snap core*.assert |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment