diff options
| author | Isaac Hill <eesocktmendez@gmail.com> | 2024-11-03 17:01:51 -0800 |
|---|---|---|
| committer | Isaac Hill <eesocktmendez@gmail.com> | 2024-11-03 17:01:51 -0800 |
| commit | 216c660cd1a1fcbd189880548c33f7846542698e (patch) | |
| tree | 425b129470914ee341655021c2034ff9476af27a /util/download-latest-save.bash | |
| parent | 6f38cde7661408ca953a96f79c9d404cea65e4db (diff) | |
Use bash variable rather than optional argument for ssh key path
Diffstat (limited to 'util/download-latest-save.bash')
| -rw-r--r-- | util/download-latest-save.bash | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/util/download-latest-save.bash b/util/download-latest-save.bash index 2ab5c62..c1d0f0d 100644 --- a/util/download-latest-save.bash +++ b/util/download-latest-save.bash @@ -1,17 +1,17 @@ #!/bin/bash # Check if remote name is provided -if [ $# -ne 1 -a $# -ne 2 ]; then - echo "Usage: $0 <remote_name> [optional_path_to_MyKey.pem]" +if [ $# -ne 1 ]; then + echo "Usage: $0 <remote_name>" exit 1 fi remote_name="$1" key_path="" -# Check if remote name is provided -if [ $# -eq 2 ]; then - key_path="-i $2" +# Check if custom PEM file is provided +if [ -n "$FACTORIO_PEM" ]; then + key_path="-i $FACTORIO_PEM" fi # Generate a human-readable timestamp |
