mirror of https://github.com/dynup/kpatch
Add vagrant-install target
Add a target to install vagrant, make sure the user is given a warning and a chance to cancel this operation. Signed-off-by: Artem Savkov <asavkov@redhat.com>
This commit is contained in:
parent
f43b061bb4
commit
c08351ec24
10
Makefile
10
Makefile
|
@ -14,6 +14,7 @@ CLEAN_DIRS += clean-$(UNITTEST_DIR)
|
|||
.PHONY: $(SUBDIRS) $(BUILD_DIRS) $(INSTALL_DIRS) $(CLEAN_DIRS)
|
||||
.PHONY: integration integration-slow integration-quick
|
||||
.PHONY: vagrant-integration-slow vagrant-integration-quick vagrant-integration
|
||||
.PHONY: vagrant-install
|
||||
|
||||
|
||||
all: $(BUILD_DIRS)
|
||||
|
@ -43,6 +44,15 @@ integration-slow: $(INTEGRATION_DIR)/Makefile build-kpatch-build build-kpatch bu
|
|||
integration-quick: $(INTEGRATION_DIR)/Makefile build-kpatch-build build-kpatch build-kmod
|
||||
$(MAKE) -C $(INTEGRATION_DIR) quick
|
||||
|
||||
vagrant-install: $(INTEGRATION_DIR)/lib.sh
|
||||
ifneq ($(shell id -u), 0)
|
||||
@echo "WARNING: This target is intended for use on freshly-installed machines/vms only." && \
|
||||
echo "Do not proceed unless you read $(INTEGRATION_DIR)/lib.sh and realise what this target does." && \
|
||||
echo "Press ctrl-c to abort, return to proceed." && \
|
||||
read
|
||||
endif
|
||||
source $(INTEGRATION_DIR)/lib.sh && kpatch_check_install_vagrant
|
||||
|
||||
vagrant-integration: vagrant-integration-quick
|
||||
|
||||
vagrant-integration-slow:
|
||||
|
|
|
@ -203,6 +203,7 @@ kpatch_check_install_vagrant()
|
|||
{
|
||||
local image_path=${1}
|
||||
[ "$(which vagrant)" == "" ] && kpatch_install_vagrant "${image_path}"
|
||||
return 0
|
||||
}
|
||||
|
||||
kpatch_write_vagrantfile_template()
|
||||
|
|
Loading…
Reference in New Issue