summaryrefslogtreecommitdiff
path: root/encedit.in
diff options
context:
space:
mode:
Diffstat (limited to 'encedit.in')
-rwxr-xr-xencedit.in52
1 files changed, 0 insertions, 52 deletions
diff --git a/encedit.in b/encedit.in
deleted file mode 100755
index a295add..0000000
--- a/encedit.in
+++ /dev/null
@@ -1,52 +0,0 @@
-#!/bin/bash
-
-. #ETCDIR#/passwort-tresor.konf
-
-if [ "$1" == "" ]
-then
- s=$(dialog --stdout --fselect /mnt/141.35.50.159_home/Dokumente/todolist.gpg 14 70)
- [ "$s" == "" ] && exit 1
- if [ "$(basename $s)" != "$(basename $s .gpg).gpg" ]
- then
- echo "File must end on \".gpg\", \"$s\" does not!"
- exit 1
- fi
-else
- s="$1"
- if [ $(basename $s) != $(basename $s .gpg).gpg ]
- then
- echo "Usage: etea encrypted.gpg"
- echo " or: etea"
- exit 1
- fi
-fi
-
-if [ "$(dirname $s)" == "/mnt/141.35.50.159_home/Dokumente" ]
-then
- sha512sum -c ~/.sums/$(basename $s .gpg).512 || dialog --msgbox "Die Prüfsumme stimmt nicht!" 14 70
-fi
-
-i=0
-while [ -e /tmp/efile.$i ] || [ -e /tmp/emsg.$i ] || [ -e /tmp/ecrpt.$i ]
-do
- i=$[$i+1]
-done
-
-gpg -o /tmp/efile.$i -d $s 2> /tmp/emsg.$i || exit 1
-if [ ! $(grep -c "Good signature from \"Erich Eckner \([^\"]*\)\?<erich@eckner.net>\"" /tmp/emsg.$i) -eq 1 ] || [ ! $(grep -c "Signature made .* using RSA key ID 0AEEC90755DA7B5A" /tmp/emsg.$i) -eq 1 ]
-then
- dialog --textbox /tmp/emsg.$i 14 70
-fi
-touch /tmp/emsg.$i
-tea /tmp/efile.$i || exit 1
-if [ ! $(ls -1t /tmp/efile.$i /tmp/emsg.$i | wc -l) -eq 2 ] || [ ! $(ls -1t /tmp/efile.$i /tmp/emsg.$i | head -n1) == "/tmp/emsg.$i" ]
-then
- gpg -o /tmp/ecrpt.$i -r erich@eckner.net -e -s /tmp/efile.$i || exit 1
- mv /tmp/ecrpt.$i $s 2> /dev/null || exit 1
- if [ "$(dirname $s)" == "/mnt/141.35.50.159_home/Dokumente" ]
- then
- sha512sum $s > ~/.sums/$(basename $s .gpg).512
- fi
-fi
-rm /tmp/efile.$i
-rm /tmp/emsg.$i