Skip to content

Commit

Permalink
Makefile: Use install(1) instead of cp(1)
Browse files Browse the repository at this point in the history
  • Loading branch information
iBug committed Jul 23, 2024
1 parent ebc72a3 commit 7b75959
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,12 @@ yukictl:

deb_dir := $(shell mktemp -d)
deb: | yukid yukictl
mkdir -p $(addprefix $(deb_dir)/, DEBIAN etc/bash_completion.d etc/yuki lib/systemd/system usr/local/bin)
cp etc/daemon.example.toml $(deb_dir)/etc/yuki
cp etc/yukid.service $(deb_dir)/lib/systemd/system
cp yukid yukictl $(deb_dir)/usr/local/bin
install -Dm644 etc/daemon.example.toml -t $(deb_dir)/etc/yuki
install -Dm644 etc/yukid.service -t $(deb_dir)/lib/systemd/system
install -Dm755 yukid yukictl -t $(deb_dir)/usr/local/bin
ln -s yukictl $(deb_dir)/usr/local/bin/yuki
install -d $(addprefix $(deb_dir), /etc/bash_completion.d /DEBIAN)
$(deb_dir)/usr/local/bin/yukictl completion bash > $(deb_dir)/etc/bash_completion.d/yukictl
sed "s/\$$VERSION\>/$(version)/g;s/^Version: v/Version: /g;s/\$$ARCH\>/$(shell go env GOARCH)/g" \
sed "s/\$$VERSION\>/$(version:v%=%)/g;s/\$$ARCH\>/$(shell go env GOARCH)/g" \
etc/debian-control > $(deb_dir)/DEBIAN/control
dpkg-deb --root-owner-group --build -Zxz $(deb_dir) .

0 comments on commit 7b75959

Please sign in to comment.