2016-01-12 13:08:43 +01:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
set -x
|
2015-09-25 10:19:04 +02:00
|
|
|
|
2016-05-31 14:58:58 +02:00
|
|
|
output_path=static/third/zxcvbn
|
|
|
|
commit_file_path=$output_path/commit
|
|
|
|
commit=0890678ede1488ecb02cda7eb793cd308a59c49d # Change this to upgrade
|
|
|
|
|
|
|
|
mkdir -p "$output_path"
|
|
|
|
|
|
|
|
if [ -e "$commit_file_path" ]
|
|
|
|
then
|
|
|
|
current_commit=`cat $commit_file_path`
|
|
|
|
else
|
|
|
|
current_commit=00
|
|
|
|
fi
|
|
|
|
|
|
|
|
if [ "$current_commit" == "$commit" ]; then
|
|
|
|
echo "Already at latest version of zxcvbn.js"
|
|
|
|
else
|
|
|
|
echo "$commit" > "$commit_file_path"
|
|
|
|
wget "https://raw.githubusercontent.com/dropbox/zxcvbn/$commit/zxcvbn.js" -O "$output_path/zxcvbn.js"
|
|
|
|
fi
|