mirror of
https://github.com/citra-emu/discord-bot.git
synced 2025-01-03 17:55:32 +00:00
28 lines
606 B
Bash
28 lines
606 B
Bash
|
#!/bin/bash -e
|
||
|
yarn
|
||
|
|
||
|
[ -d "dist" ] && rm -rf dist
|
||
|
|
||
|
echo "[+] Applying patches to accommodate bundler ..."
|
||
|
for i in patches/*.patch; do
|
||
|
echo "Applying $i ..."
|
||
|
patch -Np1 --no-backup-if-mismatch -i "$i"
|
||
|
done
|
||
|
|
||
|
yarn run parcel build
|
||
|
|
||
|
echo "[+] Installing non-bundle-able packages ..."
|
||
|
cd "dist"
|
||
|
echo '{"name": "citra-discord-bot","license": "GPL-2.0+"}' > package.json
|
||
|
yarn add discord.js@^13
|
||
|
cd ..
|
||
|
|
||
|
echo "[+] Reversing patches ..."
|
||
|
for i in patches/*.patch; do
|
||
|
echo "Reversing $i ..."
|
||
|
patch -Np1 -R -i "$i"
|
||
|
done
|
||
|
|
||
|
echo "[+] Removing patch backup files ..."
|
||
|
find . -name "*.orig" -print -delete
|