#!/bin/sh

# Simple smoketest of httpdirfs

set -eu

# try to load fuse, abort if not available in test environment
if ! modprobe fuse
then
        exit 0
fi

# show version number
httpdirfs --version

# prepare
mkdir mnt

# mount test
httpdirfs https://deb.debian.org/debian/ mnt

# read test
ls -l mnt/dists/unstable/main
gzip -t mnt/dists/unstable/main/Contents-udeb-amd64.gz
gzip -t mnt/dists/unstable/main/Contents-amd64.gz
