#!/bin/sh
# filename: prepare_proj.sh
# Prepare to build the ntch project.

for a in $1 $2 $3 $4 $5 $6 $7 $8 $9; do
	if [ ${a} = "-d" ]; then
		REMOVE_DIR=1
	fi
done

if [ ${REMOVE_DIR} ] ; then
	if  [ -d obj ]; then
		rm -rf obj
	fi
	rm -f help_gen gen/print_help.c
else
	for d in  obj obj/utils obj/net obj/_2ch obj/ui obj/html obj/usr ; do
		if ! [ -e ${d} ]; then
			mkdir ${d}
		fi
	done
fi
