Guest User

Untitled

a guest
Dec 12th, 2018
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. #!/bin/sh
  2. set -x
  3.  
  4. NAME=$1
  5. VERSION=$2
  6. shift 2
  7. echo "Hashing these files $*"
  8. file=/tmp/hashes${NAME}.${VERSION}
  9. >>for i in $*; do
  10. check=$OPAM_SWITCH_PREFIX/$i
  11. S> if [ -f $file ] ; then
  12. >> `grep -q $check $file`
  13. code=$?
  14. else
  15. code=100
  16. fi
  17. if [ $code -eq 0 ]; then
  18. S> md5sum -c $file
  19. S> if [ $? -eq 0 ]; then
  20. echo "$i is reproductible" >> /tmp/rb_log
  21. else
  22. echo "$i is NOT reproductible" >> /tmp/rb_log
  23. exit 1
  24. fi
  25. else
  26. echo "Generating for $i" >> /tmp/rb_log
  27. >> `md5sum $check >> $file`
  28. fi
  29. #fi
  30. done
Add Comment
Please, Sign In to add comment