mirror of
https://github.com/tonsky/FiraCode.git
synced 2024-08-17 00:40:32 +03:00
27 lines
547 B
Plaintext
27 lines
547 B
Plaintext
|
#!/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
|