mirror of
https://github.com/gaschz/qubes-pass.git
synced 2025-06-07 01:38:31 +02:00
Fix nosymbols.
This commit is contained in:
parent
db1c5c8b1e
commit
259a9dd373
16
bin/qvm-pass
16
bin/qvm-pass
@ -17,7 +17,7 @@ usage() {
|
||||
echo " If your key is not named after a subcommand, you can also"
|
||||
echo " get its contents by passing it as the first argument of"
|
||||
echo " this command, omitting the get subcommand."
|
||||
echo " get-or-generate [-n symbols] <key>"
|
||||
echo " get-or-generate [-n] <key>"
|
||||
echo " Retrieves a key from the pass store; creates the key"
|
||||
echo " with 32 characters length if it does not exist yet,"
|
||||
echo " and returns the generated key on standard output."
|
||||
@ -38,7 +38,7 @@ usage() {
|
||||
force=0
|
||||
multiline=0
|
||||
echo=0
|
||||
nosymbols=
|
||||
nosymbols=0
|
||||
|
||||
TEMP=`getopt -o d:n:mfe? -- "$@"` || { usage ; exit 64 ; }
|
||||
eval set -- "$TEMP"
|
||||
@ -51,7 +51,7 @@ while true ; do
|
||||
*) export QUBES_PASS_DOMAIN="$2" ; shift 2 ;;
|
||||
esac ;;
|
||||
-n)
|
||||
nosymbols="$2" ; shift 2 ;;
|
||||
nosymbols=1 ; shift ;;
|
||||
-m)
|
||||
multiline=1 ; shift ;;
|
||||
-f)
|
||||
@ -77,7 +77,7 @@ case "$1" in
|
||||
exec qubes-pass-client "$1" "$2" "$nosymbols"
|
||||
;;
|
||||
init)
|
||||
if [ "$force$multiline$echo$nosymbols" != "000" ] ; then
|
||||
if [ "$force$multiline$echo$nosymbols" != "0000" ] ; then
|
||||
echo "the $1 subcommand does not accept that option; run with -? for more information" >&2 ; exit 64
|
||||
fi
|
||||
if [ -n "$2" ] ; then
|
||||
@ -86,7 +86,7 @@ case "$1" in
|
||||
exec qubes-pass-client "$1"
|
||||
;;
|
||||
rm)
|
||||
if [ "$force$multiline$echo$nosymbols" != "000" ] ; then
|
||||
if [ "$force$multiline$echo$nosymbols" != "0000" ] ; then
|
||||
echo "the $1 subcommand does not accept that option; run with -? for more information" >&2 ; exit 64
|
||||
fi
|
||||
if [ -z "$2" ] ; then
|
||||
@ -113,7 +113,7 @@ case "$1" in
|
||||
exec qubes-pass-client "$1" "$2" "$3" "$force"
|
||||
;;
|
||||
insert)
|
||||
if [ "$nosymbols" != "" ] ; then
|
||||
if [ "$nosymbols" != "0" ] ; then
|
||||
echo "the $1 subcommand does not accept that option; run with -? for more information" >&2 ; exit 64
|
||||
fi
|
||||
shift
|
||||
@ -152,13 +152,13 @@ case "$1" in
|
||||
exec qubes-pass-client insert "$1" "$multiline" "$contents"
|
||||
;;
|
||||
list)
|
||||
if [ "$force$multiline$echo$nosymbols" != "000" ] ; then
|
||||
if [ "$force$multiline$echo$nosymbols" != "0000" ] ; then
|
||||
echo "the $1 subcommand does not accept that option; run with -? for more information" >&2 ; exit 64
|
||||
fi
|
||||
exec qubes-pass-client list
|
||||
;;
|
||||
*)
|
||||
if [ "$force$multiline$echo$nosymbols" != "000" ] ; then
|
||||
if [ "$force$multiline$echo$nosymbols" != "0000" ] ; then
|
||||
echo "the get subcommand does not accept that option; run with -? for more information" >&2 ; exit 64
|
||||
fi
|
||||
exec qubes-pass-client get "$1"
|
||||
|
@ -45,8 +45,8 @@ elif [ "$cmd" == "get-or-generate" ] ; then
|
||||
if [ "$ret" == "1" ] && echo "$out" | grep -q "not in the password store" ; then
|
||||
logger -t ruddo.PassManage "creating password entry $entry"
|
||||
ret=0
|
||||
if [ "$nosymbols" != "" ] ; then
|
||||
out=$(pass generate -n "$nosymbols" -- "$entry" 32) || ret=$?
|
||||
if [ "$nosymbols" == "1" ] ; then
|
||||
out=$(pass generate -n -- "$entry" 32) || ret=$?
|
||||
else
|
||||
out=$(pass generate -- "$entry" 32) || ret=$?
|
||||
fi
|
||||
|
@ -3,7 +3,7 @@
|
||||
%define mybuildnumber %{?build_number}%{?!build_number:1}
|
||||
|
||||
Name: qubes-pass
|
||||
Version: 0.0.10
|
||||
Version: 0.0.11
|
||||
Release: %{mybuildnumber}%{?dist}
|
||||
Summary: Inter-VM pass password management for Qubes OS AppVMs and StandaloneVMs
|
||||
BuildArch: noarch
|
||||
|
Loading…
x
Reference in New Issue
Block a user