summaryrefslogtreecommitdiffstats
path: root/devtools
diff options
context:
space:
mode:
authorBenjamin Sago <ogham@bsago.me>2017-10-01 12:28:23 +0200
committerBenjamin Sago <ogham@bsago.me>2017-10-01 12:28:23 +0200
commita7392995835608523a3c762c59c6adebbbfa982c (patch)
tree0d0b20bf4b37daf27cbc0eca9cd4e986e22abc5f /devtools
parente6a8828b6f76ff5b1d3862db5ff8f85b3c6dcd09 (diff)
Add a release-checking script
Diffstat (limited to 'devtools')
-rw-r--r--devtools/dev-download-and-check-release.sh51
1 files changed, 51 insertions, 0 deletions
diff --git a/devtools/dev-download-and-check-release.sh b/devtools/dev-download-and-check-release.sh
new file mode 100644
index 0000000..d2b89a9
--- /dev/null
+++ b/devtools/dev-download-and-check-release.sh
@@ -0,0 +1,51 @@
+# This script downloads the published versions of exa from GitHub and my site,
+# checks that the checksums match, and makes sure the files at least unzip and
+# execute okay.
+#
+# The argument should be of the form “0.8.0”, no ‘v’. That version was the
+# first one to offer checksums, so it’s the minimum version that can be tested.
+
+set +x
+trap 'exit' ERR
+
+exa_version=$1
+if [[ -z "$exa_version" ]]; then
+ echo "Please specify a version, such as '$0 0.8.0'"
+ exit 1
+fi
+
+
+# Delete anything that already exists
+rm -rfv "/tmp/${exa_version}-downloads"
+
+
+# Create a temporary directory and download exa into it
+mkdir "/tmp/${exa_version}-downloads"
+cd "/tmp/${exa_version}-downloads"
+
+echo -e "\n\033[4mDownloading stuff...\033[0m"
+wget --quiet --show-progress "https://github.com/ogham/exa/releases/download/v${exa_version}/exa-macos-x86_64-${exa_version}.zip"
+wget --quiet --show-progress "https://github.com/ogham/exa/releases/download/v${exa_version}/exa-linux-x86_64-${exa_version}.zip"
+
+wget --quiet --show-progress "https://github.com/ogham/exa/releases/download/v${exa_version}/MD5SUMS"
+wget --quiet --show-progress "https://github.com/ogham/exa/releases/download/v${exa_version}/SHA1SUMS"
+
+
+# Unzip the zips and check the sums
+echo -e "\n\033[4mExtracting that stuff...\033[0m"
+unzip "exa-macos-x86_64-${exa_version}.zip"
+unzip "exa-linux-x86_64-${exa_version}.zip"
+
+echo -e "\n\033[4mValidating MD5 checksums...\033[0m"
+md5sum -c MD5SUMS
+
+echo -e "\n\033[4mValidating SHA1 checksums...\033[0m"
+sha1sum -c SHA1SUMS
+
+
+# Finally, give the Linux version a go
+echo -e "\n\033[4mChecking it actually runs...\033[0m"
+./"exa-linux-x86_64" --version
+./"exa-linux-x86_64" --long
+
+echo -e "\n\033[1;32mAll's lookin' good!\033[0m"