Skip to content
This repository has been archived by the owner on Sep 11, 2023. It is now read-only.

Commit

Permalink
fix(files): made filenames dynamic
Browse files Browse the repository at this point in the history
  • Loading branch information
stebenz committed Mar 4, 2020
1 parent dcc9b46 commit e0089f3
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions scripts/initialize_gopass.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
#example: initialize_gopass.sh [email protected]:<YOURORGANIZATION>/<YOURSECRETSTORE> <YOURSECRETSTORE>

REPOSITORY_LIST_JSON=$1
SSHFILE=$2
GPGFILE=$3
LOGFILE=gopass.log

GOPASS_VERSION="1.8.6"
Expand All @@ -11,15 +13,13 @@ set -e

function initialize_ssh {
#initialize ssh to checkout secret store
mkdir -p $HOME/.ssh
cp ssh-key/identity $HOME/.ssh/id_rsa
chmod 700 $HOME/.ssh
chmod 600 $HOME/.ssh/id_rsa
chmod 600 $HOME/.ssh/${SSHFILE}
}

function import_and_trust_gpg-key {
# import gpg keys to keystore
gpg --import $HOME/gpg-import/argo.asc &>> $LOGFILE
gpg --import $HOME/gpg-import/${GPGFILE} &>> $LOGFILE
# trust imported keys
for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u &>> $LOGFILE); do echo -e "5\ny\n" | gpg --command-fd 0 --expert --edit-key $fpr trust &>> $LOGFILE ; done
}
Expand Down

0 comments on commit e0089f3

Please sign in to comment.