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.
pull/6/head
Brandon Davis 2015-02-23 17:00:32 -06:00
parent 4fb4ca605c
commit a63338b73b
1 changed files with 5 additions and 1 deletions

View File

@ -678,7 +678,11 @@ function kube::release::create_tarball() {
# Find gnu tar if it is available
local tar=tar
if which gtar &>/dev/null; then
tar=gtar
tar=gtar
else
if which gnutar &>/dev/null; then
tar=gnutar
fi
fi
local tar_cmd=("$tar" "czf" "${tarfile}" "-C" "${stagingdir}" "kubernetes")