mirror of
https://github.com/Antynea/grub-btrfs.git
synced 2026-03-04 13:05:00 +08:00
If rmdir fails, other commands are not executed, so move rmdir to end of uninstall section
24 lines
844 B
Makefile
24 lines
844 B
Makefile
PKGNAME ?= grub-btrfs
|
|
PREFIX ?= /usr
|
|
|
|
SHARE_DIR = $(DESTDIR)$(PREFIX)/share
|
|
LIB_DIR = $(DESTDIR)$(PREFIX)/lib
|
|
|
|
.PHONY: install
|
|
|
|
install:
|
|
@install -Dm755 -t "$(DESTDIR)/etc/grub.d/" 41_snapshots-btrfs
|
|
@install -Dm644 -t "$(DESTDIR)/etc/default/grub-btrfs/" config
|
|
@install -Dm644 -t "$(LIB_DIR)/systemd/system/" grub-btrfs.service
|
|
@install -Dm644 -t "$(LIB_DIR)/systemd/system/" grub-btrfs.path
|
|
@install -Dm644 -t "$(SHARE_DIR)/licenses/$(PKGNAME)/" LICENSE
|
|
|
|
uninstall:
|
|
rm -f "$(DESTDIR)/etc/grub.d/41_snapshots-btrfs"
|
|
rm -f "$(DESTDIR)/etc/default/grub-btrfs/config"
|
|
rm -f "$(LIB_DIR)/systemd/system/grub-btrfs.service"
|
|
rm -f "$(LIB_DIR)/systemd/system/grub-btrfs.path"
|
|
rm -f "$(SHARE_DIR)/licenses/$(PKGNAME)/LICENSE"
|
|
rm -f "$(DESTDIR)/boot/grub/grub-btrfs.cfg"
|
|
rmdir --ignore-fail-on-non-empty "$(DESTDIR)/etc/default/grub-btrfs"
|