Skip to content

Commit

Permalink
Little aesthetic changes required by the author
Browse files Browse the repository at this point in the history
  • Loading branch information
lguzzon committed Jan 14, 2020
1 parent 8f11c85 commit f0314a3
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions encpass.sh
Expand Up @@ -114,10 +114,10 @@ set_secret() {
if [ "$SECRET" = "$CSECRET" ]; then
printf "%s" "$(openssl rand -hex 16)" >"$SECRET_DIR/$SECRET_NAME.enc"

# shellcheck disable=SC2094
echo "$SECRET" | openssl enc -aes-256-cbc -e -a -iv \
"$(cat "$SECRET_DIR/$SECRET_NAME.enc")" -K \
"$(cat "$ENCPASS_HOME_DIR/keys/$LABEL/private.key")" 1>>"$SECRET_DIR/$SECRET_NAME.enc"
"$(cat "$ENCPASS_HOME_DIR/keys/$LABEL/private.key")" 1>>\
"$SECRET_DIR/$SECRET_NAME.enc"
else
echo "Error: secrets do not match. Please try again." >&2
exit 1
Expand All @@ -130,7 +130,6 @@ get_abs_filename() {
parentdir=$(dirname "${filename}")

if [ -d "${filename}" ]; then
# shellcheck disable=SC2005
echo "$(cd "${filename}" && pwd)"
elif [ -d "${parentdir}" ]; then
echo "$(cd "${parentdir}" && pwd)/$(basename "${filename}")"
Expand Down

0 comments on commit f0314a3

Please sign in to comment.