Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
script for validating unvarified.txt from https://gist.github.com/4685276/download#
#!/usr/bin/env sh
set -e
cat unverified | xargs -n 2 -P 20 ./validate_unverify.sh
#!/usr/bin/env sh
set -e
sum=$1
gem=$(basename $2)
# dir=${gem/.gem/}
home=$(gem env GEM_HOME)
# cd latest/$dir
cd $home/cache
local=`sha512sum ./$gem`
echo "=============="
echo $sum
echo $local
echo "=============="
# if [[ "" = $((echo $1 $2; $local | awk '{print $1 " " $2}') | uniq -u) ]]; then
if [[ $local != $sum ]]; then
echo $gem >> ../../valid_varifies.list
else
echo $gem >> ../../invalid_varifies.list
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment