Skip to content

Commit

Permalink
fix install
Browse files Browse the repository at this point in the history
  • Loading branch information
jakolehm committed Mar 22, 2020
1 parent 16333be commit 9ef6483
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions share/chpharos/chpharos.sh
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@ _chpharos_subcommand_longdash_help() {
Usage: chpharos <sub-command> <sub-command-options>
chpharos use [--local] <version> Set the current Pharos version
chpharos install [--force] <version> InstallPharos version. Use latest to install the latest version.
chpharos install [--force] <version> Install Pharos version. Use latest to install the latest version.
chpharos uninstall <version> Uninstall Pharos version
chpharos current [--all] Show the current Pharos version
chpharos list List installed Pharos versions
Expand Down Expand Up @@ -546,15 +546,13 @@ EOF
local dl_url="https://github.com/kontena/pharos-cluster/releases/download/v${version}/${dl_filename}"
echo "Downloading Pharos CLI v${version} from Github ..."
local destination="${destination_dir}/${dl_filename}"
local destination="${destination_dir}/pharos"
"_chpharos_get_file_${CHPHAROS_WEB_CLIENT}" "${dl_url}" "${destination}"
[ -f "${destination}" ] || break
chmod +x "${destination}"
if [ "${dl_filename}" = "pharos-cluster" ] && [ ! -f "${destination_dir}/pharos" ]; then
ln -s "${destination_dir}/pharos-cluster" "${destination_dir}/pharos"
fi
[ -f "${destination}" ] || break
if [ ! -d "${destination_dir}" ] || [ -z "$(/usr/bin/env ls -A "${destination_dir}")" ]; then
[ -d "${destination_dir}" ] && rm -rf "${destination_dir}"
Expand Down

0 comments on commit 9ef6483

Please sign in to comment.