#!/bin/bash

# Create test directory structure
TEST_DIR="$HOME/test-archive"
mkdir -p "$TEST_DIR"

# Copy configuration
cp test-archive.conf /tmp/archive.conf

# Export config location for archive script
export ARCHIVE_CONFIG=/tmp/archive.conf

# Run archive script
./archive.sh

# Test archive-cleaner
./archive-cleaner --repo "$TEST_DIR/repos/last" --archive "$TEST_DIR" --keep-years 1 