Support other names for GNU tar

The build is only looking for GNU tar as gtar on OSX, which is the name used when installed using brew. Macports installs it as gnutar, so check for that name if gtar is not found.
This commit is contained in:
Brandon Davis 2015-02-23 17:00:32 -06:00
parent 4fb4ca605c
commit a63338b73b

View File

@ -679,6 +679,10 @@ function kube::release::create_tarball() {
local tar=tar local tar=tar
if which gtar &>/dev/null; then if which gtar &>/dev/null; then
tar=gtar tar=gtar
else
if which gnutar &>/dev/null; then
tar=gnutar
fi
fi fi
local tar_cmd=("$tar" "czf" "${tarfile}" "-C" "${stagingdir}" "kubernetes") local tar_cmd=("$tar" "czf" "${tarfile}" "-C" "${stagingdir}" "kubernetes")