Skip to content

Commit d312784

Browse files
authored
Merge pull request asagage#8 from IrmantasM/best-practices/fix-README-after-lint
Linted README + removed unnecessary comment from script
2 parents b3f37ce + ba05cd0 commit d312784

File tree

2 files changed

+11
-9
lines changed

2 files changed

+11
-9
lines changed

README.md

+10-7
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,23 @@ The ARN should be the ARN of your MFA device as specified in the AWS console.
1111

1212
The MFA code is the code your MFA device gives you.
1313

14-
# Installation
14+
## Installation
15+
1516
1. Extract the files to your home directory `~/`
1617
2. Add `source ./alias.sh` to your `~/.bashrc`
1718
3. Copy `SAMPLE-mfa.cfg` to `~/mfa.cfg`
18-
4. Add a profile name and MFA ARN for each aws cli profile you wish to use. The key should be the profile name and the value should be the ARN of the MFA to use for that profile.
19-
20-
# Running the script
19+
4. Add a profile name and MFA ARN for each aws cli profile you wish to use. The key should be the profile name and the value should be the ARN of the MFA to use for that profile.
20+
21+
## Running the script
22+
2123
At a command prompt run the following command.
2224

23-
```
25+
```bash
2426
mfa <mfacode> <optional-aws-profile>
2527
```
26-
27-
## Alias Note:
28+
29+
### Alias Note
30+
2831
Scripts run in a subprocess of the calling shell. This means that
2932
if you attempt to set the env vars in the script, they will only persist
3033
inside that subprocess. The `alias.sh` script sets an alias function to source the env vars into your main shell whenever you

alias.sh

100644100755
+1-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
#!/bin/bash
22
setToken() {
3-
#do things with parameters like $1 such as
43
~/mfa.sh $1 $2
54
source ~/.token_file
65
echo "Your creds have been set in your env."
76
}
8-
alias mfa=setToken
7+
alias mfa=setToken

0 commit comments

Comments
 (0)