vexcord/vextop.sh

54 lines
997 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
# Pull the patches repository
git pull
# Do we have the Vencord sources cloned?
if [ -e Vencord/.git ]; then
# Update sources
cd Vencord
git fetch
else
# Clone sources
git clone https://github.com/Vendicated/Vencord.git Vencord
cd Vencord
fi
# Reset vexcord branch and apply patches
git checkout -B vexcord origin/main
git am ../vencord-patches/*.patch
# Build vencord
pnpm i --frozen-lockfile
node scripts/build/build.mjs
# Save this for later (Vextop needs it)
export VENCORD_FILES_DIR="$(realpath dist)"
# Back out of Vencord directory
cd ..
# Do we have the Vesktop sources cloned?
if [ -e Vesktop/.git ]; then
# Update sources
cd Vesktop
git fetch
else
# Clone sources
git clone https://github.com/Vencord/Vesktop.git Vesktop
cd Vesktop
fi
# Reset vextop branch and apply patches
git checkout -B vextop origin/main
git am ../vesktop-patches/*.patch
# Build vesktop
pnpm i --frozen-lockfile
pnpm build
# Run vesktop
pnpm electron .