mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2025-01-23 06:58:24 +00:00
fix to exhume key (steg) to correctly print on stdout when -k -
addressing issue #118
This commit is contained in:
parent
f06f303491
commit
b7e89e5246
7
tomb
7
tomb
@ -942,7 +942,10 @@ bury_key() {
|
|||||||
}
|
}
|
||||||
exhume_key() {
|
exhume_key() {
|
||||||
tombkey="`option_value -k`"
|
tombkey="`option_value -k`"
|
||||||
{ test "$tombkey" = "" } && { tombkey=stdout }
|
{ test "$tombkey" = "" } && {
|
||||||
|
tombkey="-"
|
||||||
|
_message "printing exhumed key on stdout"
|
||||||
|
}
|
||||||
|
|
||||||
imagefile="$1"
|
imagefile="$1"
|
||||||
res=1
|
res=1
|
||||||
@ -952,6 +955,7 @@ exhume_key() {
|
|||||||
_failure "Encode failed: $imagefile is not a jpeg image."
|
_failure "Encode failed: $imagefile is not a jpeg image."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
{ test "$tombkey" = "-" } || {
|
||||||
if [[ -e "$tombkey" ]]; then
|
if [[ -e "$tombkey" ]]; then
|
||||||
_warning "File exists: $tombkey"
|
_warning "File exists: $tombkey"
|
||||||
{ option_is_set -f } || {
|
{ option_is_set -f } || {
|
||||||
@ -960,6 +964,7 @@ exhume_key() {
|
|||||||
_warning "Use of --force selected: overwriting."
|
_warning "Use of --force selected: overwriting."
|
||||||
rm -f ${tombkey}
|
rm -f ${tombkey}
|
||||||
fi
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
_message "Trying to exhume a key out of image $imagefile"
|
_message "Trying to exhume a key out of image $imagefile"
|
||||||
if option_is_set --tomb-pwd; then
|
if option_is_set --tomb-pwd; then
|
||||||
|
Loading…
x
Reference in New Issue
Block a user