Przeglądaj źródła

Add script to generate checksums

Benjamin Sago 8 lat temu
rodzic
commit
d9f6b6e559
2 zmienionych plików z 17 dodań i 0 usunięć
  1. 2 0
      .gitignore
  2. 15 0
      devtools/dev-generate-checksums.sh

+ 2 - 0
.gitignore

@@ -11,3 +11,5 @@ ubuntu-xenial-16.04-cloudimg-console.log
 /exa-linux-x86_64-*.zip
 /exa-macos-x86_64
 /exa-macos-x86_64-*.zip
+/MD5SUMS
+/SHA1SUMS

+ 15 - 0
devtools/dev-generate-checksums.sh

@@ -0,0 +1,15 @@
+# This script generates the MD5SUMS and SHA1SUMS files.
+# You’ll need to have run ‘dev-download-and-check-release.sh’ and
+# ‘local-package-for-macos.sh’ scripts to generate the binaries first.
+
+set +x
+trap 'exit' ERR
+
+cd /vagrant
+rm -f MD5SUMS SHA1SUMS
+
+echo -e "\n\033[4mValidating MD5 checksums...\033[0m"
+md5sum exa-linux-x86_64 exa-macos-x86_64 | tee MD5SUMS
+
+echo -e "\n\033[4mValidating SHA1 checksums...\033[0m"
+sha1sum exa-linux-x86_64 exa-macos-x86_64 | tee SHA1SUMS