mirror of
https://github.com/Llewellynvdm/Tomb.git
synced 2024-11-29 00:06:38 +00:00
avoid gettext being a requirement and list optional tools found in version output
This commit is contained in:
parent
aa35441d69
commit
982c7591f2
37
tomb
37
tomb
@ -612,7 +612,7 @@ option_value() {
|
|||||||
# Messaging function with pretty coloring
|
# Messaging function with pretty coloring
|
||||||
function _msg() {
|
function _msg() {
|
||||||
local msg="$2"
|
local msg="$2"
|
||||||
hash gettext && msg="$(gettext -s "$2")"
|
hash gettext 2>/dev/null && msg="$(gettext -s "$2")"
|
||||||
for i in $(seq 3 ${#});
|
for i in $(seq 3 ${#});
|
||||||
do
|
do
|
||||||
msg=${(S)msg//::$(($i - 2))*::/$*[$i]}
|
msg=${(S)msg//::$(($i - 2))*::/$*[$i]}
|
||||||
@ -712,19 +712,24 @@ progress() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_list_optional_tools() {
|
||||||
|
typeset -a _deps
|
||||||
|
_deps=(gettext dcfldd wipe mkfs.ext4 steghide e2fsck)
|
||||||
|
_deps+=(resize2fs tomb-kdb-pbkdf2 qrencode swish-e unoconv)
|
||||||
|
for d in $_deps; do
|
||||||
|
_print "`which $d`"
|
||||||
|
done
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
# Check program dependencies
|
# Check program dependencies
|
||||||
#
|
#
|
||||||
# Tomb depends on system utilities that must be present, and other
|
# Tomb depends on system utilities that must be present, and other
|
||||||
# functionality that can be provided by various programs according to
|
# functionality that can be provided by various programs according to
|
||||||
# what's available on the system. If some required commands are
|
# what's available on the system. If some required commands are
|
||||||
# missing, bail out.
|
# missing, bail out.
|
||||||
_ensure_dependencies check_bin() {
|
_ensure_dependencies() {
|
||||||
|
|
||||||
# The messages system requires gettext
|
|
||||||
command -v gettext >& - || {
|
|
||||||
print "Missing required dependency: gettext. Please install it."
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
# Check for required programs
|
# Check for required programs
|
||||||
for req in cryptsetup pinentry sudo gpg; do
|
for req in cryptsetup pinentry sudo gpg; do
|
||||||
@ -2661,13 +2666,17 @@ _print "\000"
|
|||||||
_print "System utils:"
|
_print "System utils:"
|
||||||
_print "\000"
|
_print "\000"
|
||||||
cat <<EOF
|
cat <<EOF
|
||||||
`sudo -V | head -n1`
|
`sudo -V | head -n1`
|
||||||
`cryptsetup --version`
|
`cryptsetup --version`
|
||||||
`pinentry --version`
|
`pinentry --version`
|
||||||
`gpg --version | head -n1` - key forging algorithms (GnuPG symmetric ciphers):
|
`gpg --version | head -n1` - key forging algorithms (GnuPG symmetric ciphers):
|
||||||
`list_gnupg_ciphers`
|
`list_gnupg_ciphers`
|
||||||
EOF
|
EOF
|
||||||
return 0
|
_print "\000"
|
||||||
|
_print "Optional utils:"
|
||||||
|
_print "\000"
|
||||||
|
_list_optional_tools version
|
||||||
|
return 0
|
||||||
}
|
}
|
||||||
usage
|
usage
|
||||||
;;
|
;;
|
||||||
|
Loading…
Reference in New Issue
Block a user