# Bazaar merge directive format 2 (Bazaar 0.90) # revision_id: address@hidden # target_branch: http://bzr.savannah.gnu.org/r/librejs/dev/ # testament_sha1: 69c10f1754ab699250719724503bb34ceec10c76 # timestamp: 2014-12-01 10:07:55 +0100 # base_revision_id: address@hidden # # Begin patch === modified file 'data/script_libraries/gethash.sh' --- data/script_libraries/gethash.sh 2014-08-20 02:31:59 +0000 +++ data/script_libraries/gethash.sh 2014-12-01 09:04:38 +0000 @@ -3,8 +3,22 @@ # gethash.sh # # Get the hash of a js file for use in the librejs database. -# - -FILE=$1 -wget -O /tmp/jsfile $FILE -iconv -f LATIN1 -t UTF8 /tmp/jsfile | sha1sum +# Output a JSON object to be included in script-libraries.json + +url=$1 +t=$(mktemp) +wget --quiet -O $t $url +if [ $? -ne 0 ] +then + echo $url not found + exit 1 +fi +s=$(iconv -f LATIN1 -t UTF8 $t | sha1sum | awk '{print $1}') +cat <