sekrit: code nits
This commit is contained in:
parent
5d9c0c0830
commit
c0f051acd7
@ -90,7 +90,7 @@ sekrit_gen()
|
||||
l) len=$(to_number "$OPTARG") ||
|
||||
err "Invalid password length."
|
||||
;;
|
||||
[?]) usage
|
||||
*) usage
|
||||
;;
|
||||
esac
|
||||
done
|
||||
@ -116,7 +116,7 @@ sekrit_get()
|
||||
shift
|
||||
|
||||
f=$SEKRIT_DIR/$key.gpg
|
||||
[ ! -f "$f" ] && err "No data for key \"$key\"."
|
||||
[ -f "$f" ] || err "No data for key \"$key\"."
|
||||
gpg2 -qd "$f"
|
||||
}
|
||||
|
||||
@ -133,8 +133,8 @@ sekrit_has()
|
||||
ls_key()
|
||||
{
|
||||
d=$SEKRIT_DIR$1
|
||||
find "$d" -type f -name "*.gpg" | sort | cut -c $((${#d} + 1))- |
|
||||
sed "s/\.gpg$//"
|
||||
find "$d" -type f -name "*.gpg" | sort |
|
||||
sed -e "s#^$d##" -e "s#\.gpg\$##"
|
||||
}
|
||||
|
||||
sekrit_ls()
|
||||
|
Loading…
Reference in New Issue
Block a user