diff options
author | Karel Kočí <cynerd@email.cz> | 2017-04-03 20:42:16 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2017-04-03 20:42:16 +0200 |
commit | 81836945a63f726033fb6550755e2c9dbf1a1f83 (patch) | |
tree | 4202b3b9fdfaf7013660302750b461c3570e2e81 /utils | |
parent | 151158101618f9392af1e65c4012c90dda3b437f (diff) | |
download | myconfigs-81836945a63f726033fb6550755e2c9dbf1a1f83.tar.gz myconfigs-81836945a63f726033fb6550755e2c9dbf1a1f83.tar.bz2 myconfigs-81836945a63f726033fb6550755e2c9dbf1a1f83.zip |
Add system_install
Diffstat (limited to 'utils')
-rw-r--r-- | utils/inst | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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" +} |