Skip to content

Instantly share code, notes, and snippets.

View brettbergin's full-sized avatar
🏠
Working from home

Brett Bergin brettbergin

🏠
Working from home
  • California, United States
View GitHub Profile
#/bin/bash
FILENAME=codecov
curl -s https://codecov.io/bash > $FILENAME
CODECOV_VERSION=$(grep 'VERSION=\".*\"' codecov | cut -d'"' -f2);
VALIDATION_FAILURE=0
for i in 1 256 512
do
IS_DIFF=$(diff <(shasum -a $i $FILENAME) <(curl -s https://raw.githubusercontent.com/codecov/codecov-bash/$CODECOV_VERSION/SHA${i}SUM))
if [ -z "${IS_DIFF}" ]; then
echo "Sha:" $i "passes validation."