Skip to content

Commit

Permalink
Handled some windows-isms
Browse files Browse the repository at this point in the history
* Upon copy or mkdir sometimes the effect is non-blocking.
  Add a few checks before moving on
  • Loading branch information
dcwangmit01 authored and rtluckie committed Aug 24, 2018
1 parent 2f36b70 commit f1f6859
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions install
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,20 @@ curl -sSL ${download_uri} | tar -xz -C ${tmpdir}
if [[ ! -d /usr/local/bin ]]; then
# Echo the command so the user may view what was executed
(set -x; sudo install -m 0755 -d $(dirname ${kdk_destination}))

# Handle a windows-ism where the above may not take effect until
# later despite the subshell.
while [[ ! -d /usr/local/bin ]]; do
sleep 1
done
fi

# Echo the command so the user may view what was executed
(set -x; sudo install -m 0755 ${kdk_bin} ${kdk_destination})
# Handle a windows-ism where the above may not take effect until
# later despite the subshell.
while [[ ! -f ${kdk_destination} ]]; do
sleep 1
done

rm -fr ${tmpdir}

0 comments on commit f1f6859

Please sign in to comment.