Create tool_path_dir if it does not exist

This commit is contained in:
Shivam Mathur 2023-09-22 08:15:57 +05:30
parent 7fdd3ece87
commit 91026460e4
No known key found for this signature in database
GPG Key ID: 3E13E4C8591ACC2A

View File

@ -130,6 +130,9 @@ add_tool() {
tool=$2 tool=$2
ver_param=$3 ver_param=$3
tool_path="$tool_path_dir/$tool" tool_path="$tool_path_dir/$tool"
if ! [ -d "$tool_path_dir" ]; then
sudo mkdir -p "$tool_path_dir"
fi
add_path "$tool_path_dir" add_path "$tool_path_dir"
if [ -e "$tool_path" ]; then if [ -e "$tool_path" ]; then
sudo cp -aL "$tool_path" /tmp/"$tool" sudo cp -aL "$tool_path" /tmp/"$tool"