Files
explore/deploy/scripts/favicon_generator.sh
T
MaxandGitHub 476b3ad7b7 fix(deploy-script): favicon generator (#2466)
Without this change, the script tries to execute an `index.js` located
in a folder that does not have such a file.
2024-12-13 13:56:53 +01:00

22 lines
570 B
Bash
Executable File

#!/bin/bash
master_url="${FAVICON_MASTER_URL:-$NEXT_PUBLIC_NETWORK_ICON}"
export MASTER_URL="$master_url"
cd ./deploy/tools/favicon-generator
yarn install --frozen-lockfile
node "$(pwd)/index.js"
if [ $? -ne 0 ]; then
cd ../../../
exit 1
else
cd ../../../
favicon_folder="./public/assets/favicon/"
echo "⏳ Replacing default favicons with freshly generated pack..."
if [ -d "$favicon_folder" ]; then
rm -r "$favicon_folder"
fi
mkdir -p "$favicon_folder"
cp -r ./deploy/tools/favicon-generator/output/* "$favicon_folder"
fi