#!/bin/bash

set -e  # Exit on any error

REPO_DIR="x86_64"
REPO_NAME="SteavenRepo"

cd "$REPO_DIR"

# Remove old database files
rm -vf "$REPO_NAME".{db,db.tar.gz,files,files.tar.gz}*

# Add all packages to the repository
repo-add --verify --sign "$REPO_NAME.db.tar.gz" *.pkg.tar.zst

echo "Repository successfully updated!"
