From 81836945a63f726033fb6550755e2c9dbf1a1f83 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Karel=20Ko=C4=8D=C3=AD?= Date: Mon, 3 Apr 2017 20:42:16 +0200 Subject: Add system_install --- utils/inst | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'utils') diff --git a/utils/inst b/utils/inst index cb1f658..b9da163 100644 --- a/utils/inst +++ b/utils/inst @@ -97,3 +97,15 @@ inst() { fi doinst $1 $2 } + +# gpg encrypted install +ginst() { + if [ -z "$PASS" ]; then + PASS="$(gpg --batch --decrypt pass.gpg)" + fi + # TODO probably we should be sure that file will be always removed + local TMP="$(mktemp myconfigs.XXXXXXXXXX)" + gpg --batch --passphase "$PASS" --output "$TMP" --decrypt "$1" + inst "$TMP" "$2" + gpg --batch --passphase "$PASS" --output "$1" --encrypt "$TMP" +} -- cgit v1.2.3