Skip to content

Commit 2f255b2

Browse files
authored
Merge pull request #944 from afbjorklund/windows-bat
Add lima wrapper for windows without bash
2 parents 2452961 + a6edee0 commit 2f255b2

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ PLANTUML ?= plantuml # may also be "java -jar plantuml.jar" if installed elsewhe
99

1010
GOOS ?= $(shell $(GO) env GOOS)
1111
ifeq ($(GOOS),windows)
12+
bat = .bat
1213
exe = .exe
1314
endif
1415

@@ -27,6 +28,7 @@ exe: _output/bin/limactl$(exe)
2728
.PHONY: binaries
2829
binaries: clean \
2930
_output/bin/lima \
31+
_output/bin/lima$(bat) \
3032
_output/bin/limactl$(exe) \
3133
_output/bin/nerdctl.lima \
3234
_output/bin/docker.lima \
@@ -49,6 +51,11 @@ _output/bin/lima:
4951
mkdir -p _output/bin
5052
cp -a ./cmd/lima $@
5153

54+
.PHONY: _output/bin/lima.bat
55+
_output/bin/lima.bat:
56+
mkdir -p _output/bin
57+
cp -a ./cmd/lima.bat $@
58+
5259
.PHONY: _output/bin/nerdctl.lima
5360
_output/bin/nerdctl.lima:
5461
mkdir -p _output/bin
@@ -100,6 +107,7 @@ uninstall:
100107
@test -f "$(DEST)/bin/lima" || echo "lima not found in $(DEST) prefix"
101108
rm -rf \
102109
"$(DEST)/bin/lima" \
110+
"$(DEST)/bin/lima$(bat)" \
103111
"$(DEST)/bin/limactl$(exe)" \
104112
"$(DEST)/bin/nerdctl.lima" \
105113
"$(DEST)/bin/docker.lima" \

cmd/lima.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@echo off
2+
IF NOT DEFINED LIMACTL (SET LIMACTL=limactl)
3+
IF NOT DEFINED LIMA_INSTANCE (SET LIMA_INSTANCE=default)
4+
%LIMACTL% shell %LIMA_INSTANCE% %*

0 commit comments

Comments
 (0)