#
# ax-linux: Alex' Linux Tools & Scripts
-# Copyright (c)2013 Alexander Barton (alex@barton.de)
+# Copyright (c)2013-2014 Alexander Barton (alex@barton.de)
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
$(DESTDIR)$(PREFIX)/sbin/btrfs-mksnapshot
install -p -o $(USER) -g $(GROUP) -m 755 btrfs-mksnapshot-rootfs \
$(DESTDIR)$(PREFIX)/sbin/btrfs-mksnapshot-rootfs
+ test -w /etc/apt/apt.conf.d \
+ && make PREFIX= install-local-apt \
+ || make PREFIX=$(PREFIX) install-local-apt
+
+install-local-apt:
install -d -o $(USER) -g $(GROUP) -m 755 \
- $(DESTDIR)/etc/apt/apt.conf.d
+ $(DESTDIR)$(PREFIX)/etc/apt/apt.conf.d
install -p -o $(USER) -g $(GROUP) -m 644 06btrfs-mksnapshot \
- $(DESTDIR)/etc/apt/apt.conf.d/06btrfs-mksnapshot
+ $(DESTDIR)$(PREFIX)/etc/apt/apt.conf.d/06btrfs-mksnapshot
06btrfs-mksnapshot: 06btrfs-mksnapshot.tmpl
cat 06btrfs-mksnapshot.tmpl | sed -e 's@:PREFIX:@$(PREFIX)@g' \