From be32350c37465d1c618a0acdee200cbe950e5ad9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pascal=20J=C3=A4ger?= Date: Mon, 4 Oct 2021 21:53:54 +0200 Subject: [PATCH] app-backup/timeshift-autosnap: changed postinst to a massage to the user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Package-Manager: Portage-3.0.26, Repoman-3.0.3 Signed-off-by: Pascal Jäger --- .../timeshift-autosnap/timeshift-autosnap-0.9.ebuild | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/app-backup/timeshift-autosnap/timeshift-autosnap-0.9.ebuild b/app-backup/timeshift-autosnap/timeshift-autosnap-0.9.ebuild index 2f2de478e5..00aa5efc9b 100644 --- a/app-backup/timeshift-autosnap/timeshift-autosnap-0.9.ebuild +++ b/app-backup/timeshift-autosnap/timeshift-autosnap-0.9.ebuild @@ -3,7 +3,7 @@ EAPI=8 -DESCRIPTION="Automatically creats a snapshot everytime before portage installs a package" +DESCRIPTION="Automatically creates a timeshift-snapshot when executed" HOMEPAGE="https://gitlab.com/gobonja/timeshift-autosnap" SRC_URI="https://gitlab.com/gobonja/timeshift-autosnap/-/archive/${PV}/{$P}.tar.gz -> ${P}.tar.gz" @@ -37,7 +37,8 @@ src_install(){ } pkg_postinst() { - touch /etc/portage/bashrc - grep -q '#!/bin/' /etc/portage/bashrc || awk -i inplace 'BEGINFILE{print "#!/bin/sh"}{print}' /etc/portage/bashrc - grep -q 'timeshift-autosnap' /etc/portage/bashrc || echo 'function pre_pkg_setup() { /usr/bin/timeshift-autosnap ; }' >> /etc/portage/bashrc + echo "to run timeshift-autosnap everytime you emerge a package run: +'touch /etc/portage/bashrc' +'grep -q '#!/bin/' /etc/portage/bashrc || awk -i inplace 'BEGINFILE{print "#!/bin/sh"}{print}' /etc/portage/bashrc +'grep -q 'timeshift-autosnap' /etc/portage/bashrc || echo 'function pre_pkg_setup() { /usr/bin/timeshift-autosnap ; }' >> /etc/portage/bashrc'" }