make the openssl line easier to substitue (move the decrypted file to its destination after the command, not as part of it)

This commit is contained in:
Georges Dupéron 2017-03-22 00:23:27 +01:00
parent 0585c0b74a
commit 2287de322d

View File

@ -22,11 +22,12 @@ else
mkdir -p ~/.ssh
chmod 700 ~/.ssh
set +x
if openssl aes-256-cbc -K $encrypted_675a73236f08_key -iv $encrypted_675a73236f08_iv -in travis-deploy-key-id_rsa.enc -out ~/.ssh/travis-deploy-key-id_rsa -d >/dev/null 2>&1; then
if openssl aes-256-cbc -K $encrypted_675a73236f08_key -iv $encrypted_675a73236f08_iv -in travis-deploy-key-id_rsa.enc -out travis-deploy-key-id_rsa -d >/dev/null 2>&1; then
echo "Dectypred key successfully."
else
echo "Error while decrypting key."
fi
mv travis-deploy-key-id_rsa ~/.ssh/travis-deploy-key-id_rsa
set -x
chmod 600 ~/.ssh/travis-deploy-key-id_rsa
set +x