Skip to content

Commit

Permalink
Skip downloading onessl is already exists (#324)
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha authored Mar 28, 2018
1 parent b40d1e9 commit e395e1e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions hack/deploy/searchlight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@ echo "checking kubeconfig context"
kubectl config current-context || { echo "Set a context (kubectl use-context <context>) out of the following:"; echo; kubectl config get-contexts; exit 1; }
echo ""

# http://redsymbol.net/articles/bash-exit-traps/
function cleanup {
rm -rf $ONESSL ca.crt ca.key server.crt server.key
}
trap cleanup EXIT

# https://stackoverflow.com/a/677212/244009
if [ -x "$(command -v onessl >/dev/null 2>&1)" ]; then
if [ -x "$(command -v onessl)" ]; then
export ONESSL=onessl
else
# ref: https://stackoverflow.com/a/27776822/244009
Expand Down Expand Up @@ -37,12 +43,6 @@ else
esac
fi

# http://redsymbol.net/articles/bash-exit-traps/
function cleanup {
rm -rf $ONESSL ca.crt ca.key server.crt server.key
}
trap cleanup EXIT

# ref: https://stackoverflow.com/a/7069755/244009
# ref: https://jonalmeida.com/posts/2013/05/26/different-ways-to-implement-flags-in-bash/
# ref: http://tldp.org/LDP/abs/html/comparison-ops.html
Expand Down

0 comments on commit e395e1e

Please sign in to comment.