Fix FreeBSD build issues (#89)
This commit is contained in:
@@ -12,10 +12,14 @@ _stenc () {
|
|||||||
;;
|
;;
|
||||||
-f )
|
-f )
|
||||||
#list tape devices
|
#list tape devices
|
||||||
for tape in /sys/class/scsi_tape/*;
|
if [[ $(uname) == Linux ]]; then
|
||||||
do devs+="/dev/${tape##*/} ";
|
for tape in /sys/class/scsi_tape/*;
|
||||||
done;
|
do devs+="/dev/${tape##*/} ";
|
||||||
COMPREPLY=($(compgen -W "$devs" -- "$cur"))
|
done;
|
||||||
|
COMPREPLY=($(compgen -W "$devs" -- "$cur"))
|
||||||
|
else
|
||||||
|
_filedir
|
||||||
|
fi
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
-e | --encrypt )
|
-e | --encrypt )
|
||||||
@@ -26,7 +30,7 @@ _stenc () {
|
|||||||
COMPREPLY=($(compgen -W 'off on mixed' -- "$cur"))
|
COMPREPLY=($(compgen -W 'off on mixed' -- "$cur"))
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
-k | --keyfile )
|
-k | --key-file )
|
||||||
_filedir
|
_filedir
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
|
|||||||
34
configure.ac
34
configure.ac
@@ -71,34 +71,14 @@ if test "${system}" = "FreeBSD"; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# BASH completion
|
# BASH completion
|
||||||
AC_ARG_WITH([bash-completion-dir],
|
PKG_CHECK_VAR([BASH_COMPLETION_DIR], [bash-completion >= 2.0], [completionsdir],
|
||||||
AS_HELP_STRING([--with-bash-completion-dir[=PATH]],
|
[
|
||||||
[Install the bash auto-completion script in this directory. @<:@default=yes@:>@]),
|
with_bash_completion_dir=yes;
|
||||||
[],
|
AC_MSG_NOTICE(BASH_COMPLETION_DIR is $BASH_COMPLETION_DIR);
|
||||||
[with_bash_completion_dir=yes])
|
AC_SUBST([BASH_COMPLETION_DIR])
|
||||||
|
],
|
||||||
|
[with_bash_completion_dir=no])
|
||||||
|
|
||||||
if test "x$with_bash_completion_dir" = "xyes"
|
|
||||||
then
|
|
||||||
extra_args=
|
|
||||||
|
|
||||||
if test "x$prefix" != "xNONE"
|
|
||||||
then
|
|
||||||
extra_args=$prefix
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_MSG_NOTICE(extra_args is $extra_args)
|
|
||||||
|
|
||||||
PKG_CHECK_MODULES([BASH_COMPLETON], [bash-completion >= 2.0],
|
|
||||||
[
|
|
||||||
BASH_COMPLETION_DIR="$datadir/bash-completion/completions"
|
|
||||||
])
|
|
||||||
else
|
|
||||||
BASH_COMPLETION_DIR="$with_bash_completion_dir/"
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_MSG_NOTICE(BASH_COMPLETION_DIR is $BASH_COMPLETION_DIR)
|
|
||||||
|
|
||||||
AC_SUBST([BASH_COMPLETION_DIR])
|
|
||||||
AM_CONDITIONAL([ENABLE_BASH_COMPLETION],[test "x$with_bash_completion_dir" != "xno"])
|
AM_CONDITIONAL([ENABLE_BASH_COMPLETION],[test "x$with_bash_completion_dir" != "xno"])
|
||||||
|
|
||||||
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile tests/Makefile bash-completion/Makefile])
|
AC_CONFIG_FILES([Makefile src/Makefile man/Makefile tests/Makefile bash-completion/Makefile])
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ EXTRA_DIST = stenc.rst
|
|||||||
all: stenc.1
|
all: stenc.1
|
||||||
|
|
||||||
stenc.1: stenc.rst
|
stenc.1: stenc.rst
|
||||||
pandoc --standalone --to man $< -o $@
|
pandoc --standalone --to man $? -o $@
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -f stenc.1
|
rm -f stenc.1
|
||||||
|
|||||||
Reference in New Issue
Block a user