1
0
Fork 0
mirror of synced 2024-05-17 19:13:52 +12:00
FiraCode/script/package
2020-06-26 15:54:00 +02:00

27 lines
553 B
Bash
Executable file

#!/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_Fixed_v$VERSION.zip"
rm -f $FILE
pushd distr
find . -not -name ".*" | xargs zip ../$FILE
popd
ls -lah $FILE