#!/bin/bash
// You need NodeJS (https://pastebin.com/Rf1vVKsR)
// You need Bun (https://bun.sh)
// You need Go (https://pastebin.com/qFQRy0FX)

mkdir /usr/local/filebrowser
cd /usr/local/filebrowser
git init
git remote add origin https://github.com/filebrowser/filebrowser.git
git pull origin master

bun i --cwd frontend --no-save
bun --cwd frontend vite build
go build -o /usr/bin/fb

./fb --address 0.0.0.0 --port 7474 --database filebrowser.db --username admin --password 1234