aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2017-04-03 20:42:16 +0200
committerKarel Kočí <cynerd@email.cz>2017-04-03 20:42:16 +0200
commit81836945a63f726033fb6550755e2c9dbf1a1f83 (patch)
tree4202b3b9fdfaf7013660302750b461c3570e2e81 /utils
parent151158101618f9392af1e65c4012c90dda3b437f (diff)
downloadmyconfigs-81836945a63f726033fb6550755e2c9dbf1a1f83.tar.gz
myconfigs-81836945a63f726033fb6550755e2c9dbf1a1f83.tar.bz2
myconfigs-81836945a63f726033fb6550755e2c9dbf1a1f83.zip
Add system_install
Diffstat (limited to 'utils')
-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"
+}