1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57
|
#!/bin/bash
set -e
FILES="aes=core+enc-base64+md5+evpkdf+cipher-core+aes
hmac-md5=core+md5+hmac
hmac-ripemd160=core+ripemd160+hmac
hmac-sha1=core+sha1+hmac
hmac-sha224=core+sha256+sha224+hmac
hmac-sha256=core+sha256+hmac
hmac-sha384=core+x64-core+sha512+sha384+hmac
hmac-sha3=core+x64-core+sha3+hmac
hmac-sha512=core+x64-core+sha512+hmac
md5=core+md5
pbkdf2=core+sha1+hmac+pbkdf2
rabbit=core+md5+evpkdf+cipher-core+rabbit
rabbit-legacy=core+md5+evpkdf+cipher-core+rabbit-legacy
rc4=core+md5+evpkdf+cipher-core+rc4
ripemd160=core+ripemd160
sha1=core+sha1
sha224=core+sha256+sha224
sha256=core+sha256
sha384=core+x64-core+sha512+sha384
sha3=core+x64-core+sha3
sha512=core+x64-core+sha512
tripledes=core+enc-base64+md5+evpkdf+cipher-core+tripledes"
rm -rf links
mkdir -p links
echo "Creating compatibility links"
for file in components/*; do
ln -s $file links/
done
for file in components/*; do
echo Compressing $file >&2
yui-compressor -o "components/$(basename -s .js $file)-min.js" $file
done
rm -rf rollups
mkdir -p rollups
for file in $FILES; do
echo Building rollups/$file >&2
if [[ $file =~ ([-0-9a-z]+)=([-0-9a-z+]+) ]]; then
target=${BASH_REMATCH[1]}
sources=${BASH_REMATCH[2]}
_old_IFS=$IFS
IFS='+'
for src in $sources; do
cat components/$src-min.js >> rollups/$target.js
done
IFS=$_old_IFS
fi
done
|