install: all
mkdir -p $(PREFIX) $(MODULE_PREFIX) $(DATABASE_PREFIX) $(WEBROOT_PREFIX) $(PROJECT_PREFIX) $(TOOL_PREFIX) $(PREFIX)/etc $(PREFIX)/bin $(PREFIX)/lib/mandshurica/db
touch $(PREFIX)/lib/mandshurica/db/auth.db $(PREFIX)/lib/mandshurica/db/login.db $(PREFIX)/lib/mandshurica/db/project.db
- ./Mandshurica/mandshurica --create $(PREFIX)/etc/mandshurica.conf
+ if [ -e $(PREFIX)/etc/mandshurica.conf ]; then \
+ while true; do\
+ read -p "Overwrite the config with default one? " "yn";\
+ if [ "$$yn" = "y" -o "$$yn" = "Y" ]; then\
+ ./Mandshurica/mandshurica --create $(PREFIX)/etc/mandshurica.conf;\
+ break;\
+ elif [ "$$yn" = "n" -o "$$yn" = "N" ]; then\
+ break;\
+ else\
+ echo "Please enter Y or N";\
+ fi;\
+ done;\
+ else\
+ ./Mandshurica/mandshurica --create $(PREFIX)/etc/mandshurica.conf;\
+ fi
$(MAKE) -C ./Mandshurica install $(PREFIXES)
$(MAKE) -C ./Module install $(PREFIXES)
$(MAKE) -C ./Tool install $(PREFIXES)