diff --git a/build.sh b/build.sh index a791605..e7217ab 100755 --- a/build.sh +++ b/build.sh @@ -1,5 +1,8 @@ #!/usr/bin/env bash set -euo pipefail + +# install deps +apt update && apt install jq -y npm install -g web-ext pnpm git clone --depth 1 https://github.com/Vendicated/Vencord @@ -11,7 +14,13 @@ pnpm run buildWeb # change id cd ./dist/ -jq '.browser_specific_settings.gecko.id = "vencord-firefox@askiiart.net"' ./firefox-unpacked/manifest.json >./firefox-unpacked/manifest.json +# can't just `tee` it directly into it, otherwise tee will erase all contents of the file, *then* jq will run +# (same for redirecting the output ofc) +tmpfile=$(mktemp) +jq '.browser_specific_settings.gecko.id = "vencord-firefox@askiiart.net"' ./firefox-unpacked/manifest.json -c >$tmpfile +mv $tmpfile ./firefox-unpacked/manifest.json + +# build it to an extension or whatever idk web-ext build -s ./firefox-unpacked/ # move to /misc and set version