Skip to content

Instantly share code, notes, and snippets.

@leckylao
Created February 1, 2013 04:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leckylao/4689368 to your computer and use it in GitHub Desktop.
Save leckylao/4689368 to your computer and use it in GitHub Desktop.
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