This repository was archived by the owner on Aug 2, 2019. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +20
-2
lines changed
Expand file tree Collapse file tree 1 file changed +20
-2
lines changed Original file line number Diff line number Diff line change 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
@@ -16,8 +16,22 @@ MEMORY=${MEMORY:-10GB}
1616CPUS=${CPUS:- 4}
1717DISK_SIZE=${DISK_SIZE:- 50g}
1818
19+ if [ -z " ${VM_DRIVER} " ]; then
20+ # check for default driver
21+ VM_DRIVER=$( minishift config get vm-driver --profile minishift)
22+ if [ -z " $VM_DRIVER " ] || [ $VM_DRIVER = " <nil>" ]; then
23+ if [[ -z " ${OSTYPE} " && $( uname) == " Darwin" ]] || [ " ${OSTYPE# darwin} " != " ${OSTYPE} " ]; then
24+ # set hyperkit as default on macOs
25+ VM_DRIVER=" hyperkit"
26+ else
27+ # no driver to set
28+ VM_DRIVER=" "
29+ fi
30+ fi
31+ fi
32+
1933# blow away everything in the knative profile
20- minishift profile delete knative --force || true
34+ minishift profile delete knative --force > /dev/null 2>&1
2135
2236# configure knative profile
2337minishift profile set knative
@@ -26,6 +40,10 @@ minishift config set memory ${MEMORY}
2640minishift config set cpus ${CPUS}
2741minishift config set disk-size ${DISK_SIZE}
2842minishift config set image-caching true
43+ if [ -n " ${VM_DRIVER} " ]; then
44+ minishift config set vm-driver ${VM_DRIVER}
45+ fi
46+
2947minishift addons enable admin-user
3048
3149# Start minishift
You can’t perform that action at this time.
0 commit comments