Skip to content

Commit 8361e19

Browse files
committed
new shellcheck fix
1 parent e77837f commit 8361e19

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

copy_certificates

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ proxy_exists(){
44
echo "Check for certificates in $HOME/.globus"
55
echo "..."
66
if [ -d "$HOME/.globus" ]; then
7-
if [ -a "$HOME/.globus/usercert.pem" ] && [ -a "$HOME/.globus/userkey.pem" ]; then
7+
if [ -e "$HOME/.globus/usercert.pem" ] && [ -e "$HOME/.globus/userkey.pem" ]; then
88
echo "Certificates exist. Doing nothing."
99
return 0
1010
fi

install_certificate

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ proxy_exists(){
66
if [ "$1" != "N" ] && [ "$1" != "Y" ]; then
77
echo -e "\tUnknown option \"$1\". You must specify [Y/N] to delete or keep any existing .pem files."
88
return 0
9-
elif [ -a "$HOME/.globus/usercert.pem" ] && [ -a "$HOME/.globus/userkey.pem" ] && [ "$1" == "N" ]; then
9+
elif [ -e "$HOME/.globus/usercert.pem" ] && [ -e "$HOME/.globus/userkey.pem" ] && [ "$1" == "N" ]; then
1010
echo -e "\tCertificates exist. Doing nothing."
1111
return 0
12-
elif [ -a "$HOME/.globus/usercert.pem" ] && [ -a "$HOME/.globus/userkey.pem" ] && [ "$1" == "Y" ]; then
12+
elif [ -e "$HOME/.globus/usercert.pem" ] && [ -e "$HOME/.globus/userkey.pem" ] && [ "$1" == "Y" ]; then
1313
echo -e "\tCertificates exist, but removing them in order to replace them."
1414
rm -f "$HOME/.globus/usercert.pem"
1515
rm -f "$HOME/.globus/userkey.pem"

install_certificate_for_cernsso

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ proxy_exists(){
66
if [ "$1" != "N" ] && [ "$1" != "Y" ]; then
77
echo -e "\tUnknown option \"$1\". You must specify [Y/N] to delete or keep any existing .pem/.key files."
88
return 0
9-
elif [ -a "$2/myCert.pem" ] && [ -a "$2/myCert.key" ] && [ "$1" == "N" ]; then
9+
elif [ -e "$2/myCert.pem" ] && [ -e "$2/myCert.key" ] && [ "$1" == "N" ]; then
1010
echo -e "\tCertificates/keys exist. Doing nothing."
1111
return 0
12-
elif [ -a "$2/myCert.pem" ] && [ -a "$2/myCert.key" ] && [ "$1" == "Y" ]; then
12+
elif [ -e "$2/myCert.pem" ] && [ -e "$2/myCert.key" ] && [ "$1" == "Y" ]; then
1313
echo -e "\tCertificates/keys exist, but removing them in order to replace them."
1414
rm -f "$2/myCert.pem"
1515
rm -f "$2/myCert.key"

0 commit comments

Comments
 (0)