Skip to content

Commit

Permalink
Fixes installing of mdbook from GH release page [fix]
Browse files Browse the repository at this point in the history
  • Loading branch information
hoijui committed Nov 19, 2024
1 parent f9cf513 commit 5485b38
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion scripts/install_rust_gh_tool
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,16 @@ else
"$tool_dl_url"
cd "$extraction_dir"
tar xvzf "$tool_local_archive"
mv "$tool_local_dir/$bin" "$install_root/"
if [ -f "$tool_local_dir/$bin" ]
then
extracted_bin="$tool_local_dir/$bin"
elif [ -f "$bin" ]
then
extracted_bin="$bin"
else
_error "Failed to find binary '$bin' after extracting release archive '$tool_local_archive'."
fi
mv "$extracted_bin" "$install_root/"
rm -Rf "$tool_local_dir"
rm "$tool_local_archive"
fi
Expand Down

0 comments on commit 5485b38

Please sign in to comment.