#!/usr/bin/env sh

CI_DATA=$1
suffix=$2
image=$3
mount_point=$4

for i in upper wd
do
    if [ -d ${CI_DATA}/overlayfs/$i-${suffix} ]
    then
        rm -rf ${CI_DATA}/overlayfs/$i-${suffix}
    fi
    mkdir -p ${CI_DATA}/overlayfs/$i-${suffix}
done


/usr/libexec/apptainer/bin/squashfuse_ll $image $mount_point
