File tree 1 file changed +8
-0
lines changed
1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ LIB_DIR = $(DESTDIR)$(PREFIX)/lib
9
9
.PHONY : install uninstall help
10
10
11
11
install :
12
+ @if test " $( shell id -u) " ! = 0; then \
13
+ echo " You are not root, run this target as root please." ; \
14
+ exit 1; \
15
+ fi
12
16
@install -Dm755 -t " $( DESTDIR) /etc/grub.d/" 41_snapshots-btrfs
13
17
@install -Dm644 -t " $( DESTDIR) /etc/default/grub-btrfs/" config
14
18
@install -Dm644 -t " $( LIB_DIR) /systemd/system/" grub-btrfs.service
@@ -23,6 +27,10 @@ install:
23
27
@install -Dm644 " initramfs/readme.md" " $( SHARE_DIR) /doc/$( PKGNAME) /initramfs-overlayfs.md"
24
28
25
29
uninstall :
30
+ @if test " $( shell id -u) " ! = 0; then \
31
+ echo " You are not root, run this target as root please." ; \
32
+ exit 1; \
33
+ fi
26
34
@grub_dirname=" $$ (grep -oP '^[[:space:]]*GRUB_BTRFS_GRUB_DIRNAME=\K.*' " $(DESTDIR ) /etc/default/grub-btrfs/config" | sed " s| \s * # .*||;s|(\s*\(.\+\)\s*)|\1|;s|['\"]||g")"; \
27
35
rm -f " $$ {grub_dirname:-/boot/grub}/grub-btrfs.cfg"
28
36
@rm -f " $( DESTDIR) /etc/default/grub-btrfs/config"
You can’t perform that action at this time.
0 commit comments