Hack to customize fork awesome
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

39 lines
1.1 KiB

#!/bin/bash
if [ ! -f "./Fork-Awesome/.git" ]; then
echo -e "\x1b[31;1mFA submodule is not initialized, exit...\x1b[m"
exit
fi
if [ ! -f "./wanted.ini" ]; then
echo -e "\x1b[31;1mMissing customization file './wanted.ini'!\x1b[m"
exit
fi
if [ ! -d "./Fork-Awesome/.bundle" ]; then
echo -e "\x1b[31;1mGems not installed in the FA submodule, cannot build. Did you run install.sh?\x1b[m"
exit
fi
if [ ! -d "./Fork-Awesome/node_modules" ]; then
echo -e "\x1b[31;1mNode modules not installed in the FA submodule, cannot build. Did you run install.sh?\x1b[m"
exit
fi
echo "=== Starting a build... ==="
(cd patcher && node ./apply-filter.js)
(cd "./Fork-Awesome/src/icons/" && make)
echo -e "\x1b[33mIf the make target failed at a \"cp\" statement, that is most likely safe to ignore\x1b[m"
fontname=$(cat fontcustom.yml | head -n1 | sed "s/font_name: //")
if [ ! -f "./Fork-Awesome/src/icons/$fontname/$fontname-preview.html" ]; then
echo -e "\x1b[31;1mBuild failed, output directory is empty.\x1b[m"
exit
fi
rm ./output/*
cp "./Fork-Awesome/src/icons/$fontname/"* ./output
echo
echo "=== Your font \"$fontname\" is ready in the output/ directory ==="