#!/bin/sh

CLEAN=0

if test "$1" = "CLEAN" ; then
    shift
    CLEAN=1
fi

for i in $@ ; do
    if test "$CLEAN" = "1" ; then
        rm -f xemacs@MAJVERSION@@SUBNAME@-$i.preinst.in
    else
        cat preinst-base | sed -e "s/REPLACE_ME/$i/g" > xemacs@MAJVERSION@@SUBNAME@-$i.preinst.in
    fi
done

