Simplify makefile [skip ci]
This commit is contained in:
parent
93c80f01b8
commit
51071dc4cf
34
Makefile
34
Makefile
@ -1,33 +1,15 @@
|
|||||||
GOBUILD ?= go build
|
GOBUILD ?= go build
|
||||||
|
|
||||||
pak: main.go
|
all: main.go
|
||||||
$(GOBUILD)
|
$(GOBUILD)
|
||||||
|
|
||||||
|
install: PAK_CFG_MGR ?= apt
|
||||||
|
install: pak.toml pak
|
||||||
|
install -Dm755 pak $(DESTDIR)/usr/bin/pak
|
||||||
|
sed 's/activeManager = ""/activeManager = "$(PAK_CFG_MGR)"/' pak.toml > pak-new.toml
|
||||||
|
install -Dm644 pak-new.toml $(DESTDIR)/etc/pak.toml
|
||||||
|
|
||||||
installbinonly: pak
|
installbinonly: pak
|
||||||
install -Dm755 pak $(DESTDIR)/usr/bin/pak
|
install -Dm755 pak $(DESTDIR)/usr/bin/pak
|
||||||
|
|
||||||
aptinstall: install-config.sh pak.toml pak
|
.PHONY: all install installbinonly
|
||||||
install -Dm644 pak.toml $(DESTDIR)/etc/pak.toml
|
|
||||||
bash install-config.sh apt $(DESTDIR)
|
|
||||||
|
|
||||||
snapinstall: install-config.sh pak.toml pak
|
|
||||||
install -Dm755 pak $(DESTDIR)/usr/bin/pak
|
|
||||||
bash install-config.sh snap $(DESTDIR)
|
|
||||||
|
|
||||||
yayinstall: install-config.sh pak.toml pak
|
|
||||||
install -Dm755 pak $(DESTDIR)/usr/bin/pak
|
|
||||||
bash install-config.sh yay $(DESTDIR)
|
|
||||||
|
|
||||||
pacinstall: install-config.sh pak.toml pak
|
|
||||||
install -Dm755 pak $(DESTDIR)/usr/bin/pak
|
|
||||||
bash install-config.sh pacman $(DESTDIR)
|
|
||||||
|
|
||||||
aptitude: install-config.sh pak.toml pak
|
|
||||||
install -Dm755 pak $(DESTDIR)/usr/bin/pak
|
|
||||||
bash install-config.sh aptitude $(DESTDIR)
|
|
||||||
|
|
||||||
brewinstall: install-config.sh pak.toml pak
|
|
||||||
install -Dm755 pak $(DESTDIR)/usr/bin/pak
|
|
||||||
bash install-config.sh brew $(DESTDIR)
|
|
||||||
|
|
||||||
.PHONY: pak $(MAKECMDGOALS)
|
|
||||||
|
@ -1,2 +0,0 @@
|
|||||||
sed "s/activeManager = \"\"/activeManager = \"$1\"/" pak.toml > pak-new.toml
|
|
||||||
install -Dm644 pak-new.toml "$2"/etc/pak.toml
|
|
Loading…
Reference in New Issue
Block a user