-if test ! -f apt-ftparchive.conf.in; then
- echo "$0: apt-ftparchive.conf.in must be located in current directory"
+D0=`dirname $0`
+confdir=`cd $D0; pwd`
+
+usage()
+{
+ cat <<EOF
+Usage: update-archive.sh [OPTIONS]
+Options:
+ [--debian=distros]
+ [--ubuntu=distros]
+ [--clear]
+EOF
+ exit $1
+}
+
+do_help=false
+clear=false
+while test $# -gt 0; do
+ case "$1" in
+ -*=*) optarg=`echo "$1" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
+ *) optarg= ;;
+ esac
+ case $1 in
+ --clear)
+ clear=true
+ ;;
+ --debian=*)
+ DEBIAN_DIST=$optarg
+ ;;
+ --ubuntu=*)
+ UBUNTU_DIST=$optarg
+ ;;
+ -*)
+ do_help=true
+ ;;
+ esac
+ shift
+done
+
+if $do_help; then
+ usage 1>&1
+fi
+
+if test ! -f ${confdir}/apt-ftparchive.conf.in; then
+ echo "$0: ${condir}/apt-ftparchive.conf.in not found"
+ exit 1
+fi
+if test ! -f ${confdir}/apt-release.conf.in; then
+ echo "$0: ${condir}/apt-release.conf.in not found"