#! /bin/sh
# mkpdir dir ... - make directory and parents

# =()<. ${NEWSCONFIG-@<NEWSCONFIG>@}>()=
. ${NEWSCONFIG-/usr/local/lib/news/bin/config}
export NEWSCTL NEWSBIN NEWSARTS
PATH=$NEWSCTL/bin:$NEWSBIN/relay:$NEWSBIN:$NEWSPATH ; export PATH	# must include this file's dir.

umask $NEWSUMASK

status=0
for dir
do
	mkdir "$dir" 2>/dev/null
	if test ! -d "$dir"; then
		mkpdir "`echo $dir | sed 's;/[^/]*$;;'`"
		mkdir "$dir"
		if test ! -d "$dir"; then
			status=1
		fi
	fi
done
exit $status
