Last active
February 15, 2026 13:56
-
-
Save zoltan-kiss-hungary/04a89c4d7adc78897a392d6beafd2f55 to your computer and use it in GitHub Desktop.
Fake a local Debian repository for Modrinth
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # inspired by https://gist.github.com/onjin/ef1ba348b2ff79808811e280df2d263c | |
| #!/bin/bash | |
| debdir=/usr/local/modrinthdebs | |
| aptconf=/etc/apt/apt.conf.d/100update_modrinth | |
| sourcelist=/etc/apt/sources.list.d/modrinthdebs.list | |
| sudo apt install wget curl | |
| # https://modrinth.com/app couldn't be parsed without JS, hence the workaround to use this Arch repo | |
| sudo mkdir -p $debdir | |
| ( echo 'APT::Update::Pre-Invoke {"cd '$debdir' && wget -qN `curl -s https://aur.archlinux.org/packages/modrinth-app-bin 2>&1 | grep -P -m 1 -o 'https://.*?amd64.deb' | head -1` && apt-ftparchive packages . > Packages && apt-ftparchive release . > Release";};' | sudo tee $aptconf | |
| echo 'deb [trusted=yes lang=none] file:'$debdir' ./' | sudo tee $sourcelist | |
| ) >/dev/null | |
| sudo apt update | |
| sudo apt install modrinth-app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment