#! /bin/sh

. /lib/fs2ram/unmount-scripts/common.sh

dir="$1"
shift
options="$*"

# Decode the options given in parameters
exclude_pattern=""
include_pattern="."
for opt in $options; do
    case "$opt" in
        exclude_pattern=*)
            exclude_pattern=${opt#exclude_pattern=*}
            ;;
        include_pattern=*)
            include_pattern=${opt#include_pattern=*}
            ;;
        *)
            ;;
    esac
done

generate_sh_header
generate_file_content "$dir" "$include_pattern" "$exclude_pattern"

