Skip to content

Commit a0e1081

Browse files
author
Tim Martin
committed
fix Makefile for different read implementation with default REPLY
1 parent 251d9dc commit a0e1081

File tree

1 file changed

+16
-13
lines changed

1 file changed

+16
-13
lines changed

Makefile

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -385,23 +385,26 @@ dev:
385385
$(MAKE) install ENVIRONMENT=local
386386
$(MAKE) hydrate ENVIRONMENT=local
387387

388+
388389
.phony: confirm
389-
confirm:
390-
@printf "\n\n**DANGER** \n" ; \
391-
echo "About to rm your SERVER data subdirs, all docker volumes and your codebase/web/ directory" ; \
392-
read -p "Are you sure you want to continue and drop your data? [y/N] " REPLY && \
393-
if [ "$${REPLY:-N}" == y ] ; then echo "Continuing" ; true ; else printf "Aborting" ; false; fi && \
394-
printf "\n\n"
390+
confirm:
391+
@echo "\n\n"
392+
@echo -n "Are you sure you want to continue and drop your data? [y/N] " && read ans && [ $${ans:-N} = y ]
393+
@echo "\n\n"
395394

396395
# Destroys everything beware!
397396
.PHONY: clean
398397
.SILENT: clean
399-
clean: confirm
400-
-docker-compose down -v --remove-orphans && \
401-
echo "Preparing to forcibly remove 'codebase/' and certs/ directories" && \
402-
echo "Note: elevating to root permissions via sudo to remove possible codebase/ with changed ownership" && \
398+
clean:
399+
echo "**DANGER** About to rm your SERVER data subdirs, your docker volumes and your codebase/web"
400+
$(MAKE) confirm
401+
-docker-compose down -v --remove-orphans
402+
# $(MAKE) set-codebase-owner
403+
echo "Preparing to forcibly remove 'codebase/' and certs/ directories"
404+
echo "Note: elevating to root permissions via sudo to remove possible codebase/ with changed ownership"
403405
echo "you might be prompted for local password for sudo permissions:"
404-
sudo /bin/rm -fr codebase certs && \
405-
echo "Refreshing 'codebase/':" && \
406-
git checkout codebase && \
406+
sudo rm -fr codebase certs
407+
# git clean -xffd .
408+
git checkout codebase
407409
echo "Clean completed successfully."
410+

0 commit comments

Comments
 (0)