Closed amtoine closed 1 year ago
Thanks for your work once again an amazing job rocket
glad you like it :relieved:
I think we're ready to merge, I however suggest that we wait some time for @vSt11 review/approval (in an educational will), but @amtoine feel free to merge this PR if @vSt11 doesn't answer in the coming days wink
no no, there's no rush, this PR can wait for @vSt11 :yum:
This PR adds a bunch of flags to the
gpg-share.sh
script, to make its use both documented and easier. This PR will close #37.the changes
getopt
command :point_right: on dfa0b31, the script is equivalent to the one on 6d7a9f6, but with empty flag supportgit diff f55d62a^..dfa0b31
to see the diff-f
,-u
and-U
do not useUSER_FILE
anymoregit show e83d952
to see the diffecho -n
lines thanks to the new better array system, see 9ec42b9 for detailsgit diff da112f9^..e30043d:
to see the diffdetails about the usage
one can see the following
the
-u
and-U
flags can be used multiple times, and they are meant to be used as such to avoid word splitting issues withbash
, i chose to implement the flag parsing as follows:-u
each time. this allows to write./scripts/gpg-share.sh -u "Alexandre Tullot"
and the id won't be split :star_struck:./scripts/gpg-share.sh -u amtoine -u "Alexandre Tullot"
this is the meaning of the
{ ... }
in the usage! they mean the-u
and-U
flags can be used any number of times :+1:what i did not do for now
-u
and-U
with multiple user ids: this is too complex inbash
according to me, i think this would require way to much work and might even be ambiguous asbash
does not have typed variables, e.g.-u amtoine "Alexandre Tullot" foo
might be treated as"amtoine Alexandre Tullot foo"
:thinking: in the end, i think the-u SINGLE_USER_ID
syntax is as easy to write and far less ambiguous than the multi-id one--check-keyring (-k)
option: i do not know really what to check there :confused:./scripts/
: this was not the focus of this PR, so i did not change anything in that direction :+1:-u amtoine -u amtoine
and the script will encrypt the secret file twice and overwrite previous encryptions for theamtoine
user