Skip to content
This repository was archived by the owner on Aug 2, 2019. It is now read-only.

Commit 2457ccb

Browse files
committed
feat(minishift): Set hyperkit as default vm on macOs
Fixes #31.
1 parent d8582a9 commit 2457ccb

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

etc/scripts/install-on-minishift.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env bash
1+
#!/usr/bin/env bash
22

33
# WARNING: this totally destroys and recreates your `knative` profile,
44
# thereby guaranteeing (hopefully) a clean environment upon successful
@@ -15,6 +15,12 @@ OPENSHIFT_VERSION=${OPENSHIFT_VERSION:-v3.11.0}
1515
MEMORY=${MEMORY:-10GB}
1616
CPUS=${CPUS:-4}
1717
DISK_SIZE=${DISK_SIZE:-50g}
18+
VM_DRIVER=${VM_DRIVER:-}
19+
20+
# Set hyperkit as default on macOs
21+
if [[ -z "${OSTYPE}" && $(uname) == "Darwin" ]] || [ "${OSTYPE#darwin}" != "${OSTYPE}" ]; then
22+
VM_DRIVER=${VM_DRIVER:-hyperkit}
23+
fi
1824

1925
# blow away everything in the knative profile
2026
minishift profile delete knative --force
@@ -26,6 +32,10 @@ minishift config set memory ${MEMORY}
2632
minishift config set cpus ${CPUS}
2733
minishift config set disk-size ${DISK_SIZE}
2834
minishift config set image-caching true
35+
if [ -n "${VM_DRIVER}" ]; then
36+
minishift config set vm-driver ${VM_DRIVER}
37+
fi
38+
2939
minishift addons enable admin-user
3040

3141
# Start minishift

0 commit comments

Comments
 (0)