forked from ryanoasis/nerd-fonts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes use of archive, archive patcher and cleanup
- Loading branch information
Showing
2 changed files
with
50 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
#!/usr/bin/env bash | ||
# Nerd Fonts Version: 2.1.0 | ||
# Script Version: 1.0.0 | ||
# Archives the font patcher script and the required source files | ||
# used for debugging | ||
# set -x | ||
|
||
# LINE_PREFIX="# [Nerd Fonts]" | ||
scripts_root_dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/" | ||
parent_dir="${PWD}/../../" | ||
outputdir=$scripts_root_dir../../archives | ||
|
||
mkdir -p "$outputdir" | ||
|
||
# create a mini readme with basic info on Nerd Fonts project | ||
touch "$outputdir/readme.md" | ||
mini_readme="$outputdir/readme.md" | ||
cat "$parent_dir/src/archive-font-patcher-readme.md" >> "$mini_readme" | ||
|
||
# clear out the directory zips | ||
find "${outputdir:?}" -name "FontPatcher.zip" -type f -delete | ||
|
||
cd -- "$scripts_root_dir/../../" || exit 1 | ||
find "src/glyphs" | zip -9 "$outputdir/FontPatcher" -@ | ||
find "font-patcher" | zip -9 "$outputdir/FontPatcher" -@ | ||
|
||
# add mini readme file | ||
zip -9 "$outputdir/FontPatcher" -rj "$mini_readme" -q | ||
rm -f "$mini_readme" | ||
|
||
# @TODO check zip status | ||
# zipStatus=$? | ||
|
||
# if [ "$zipStatus" != "0" ] | ||
# then | ||
# echo "$LINE_PREFIX error, font-patcher archive not created" | ||
# exit 1 | ||
# else | ||
# echo "$LINE_PREFIX font-patcher archive created successfully" | ||
# fi; |