1
0
Fork 0
mirror of synced 2024-06-13 16:15:01 +12:00
FiraCode/script/package

27 lines
547 B
Plaintext
Raw Normal View History

2020-05-18 09:34:17 +12:00
#!/bin/zsh -euo pipefail
cd "`dirname $0`/.."
setopt BASH_REMATCH
MAJOR=`cat FiraCode.glyphs | grep versionMajor`
VERSION=""
if [[ $MAJOR =~ 'versionMajor = ([0-9]+);' ]] ; then
VERSION="${BASH_REMATCH[2]}"
fi
MINOR=`cat FiraCode.glyphs | grep versionMinor`
if [[ $MINOR =~ 'versionMinor = ([0-9]+);' ]] ; then
MATCH="${BASH_REMATCH[2]}"
if [ "$MATCH" != "0" ] ; then
VERSION="$VERSION.$MATCH"
fi
fi
FILE="Fira_Code_v$VERSION.zip"
rm -f $FILE
pushd distr
find . -not -name ".*" | xargs zip ../$FILE
popd
ls -lah $FILE