aboutsummaryrefslogtreecommitdiff
path: root/utils/inst
diff options
context:
space:
mode:
Diffstat (limited to 'utils/inst')
-rw-r--r--utils/inst12
1 files changed, 12 insertions, 0 deletions
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"
+}