mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-09 21:21:14 +00:00
Use ensure-temp-dir in the common.sh script
Instead of having an ensure-temp-dir function in multiple places, add it to the common.sh script which is sourced by all the providers.
This commit is contained in:
@@ -570,18 +570,6 @@ function verify-prereqs {
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
# Create a temp dir that'll be deleted at the end of this bash session.
|
||||
#
|
||||
# Vars set:
|
||||
# KUBE_TEMP
|
||||
function ensure-temp-dir {
|
||||
if [[ -z ${KUBE_TEMP-} ]]; then
|
||||
KUBE_TEMP=$(mktemp -d -t kubernetes.XXXXXX)
|
||||
trap 'rm -rf "${KUBE_TEMP}"' EXIT
|
||||
fi
|
||||
}
|
||||
|
||||
# Take the local tar files and upload them to S3. They will then be
|
||||
# downloaded by the master as part of the start up script for the master.
|
||||
#
|
||||
|
Reference in New Issue
Block a user