Create tool_path_dir if it does not exist
This commit is contained in:
parent
7fdd3ece87
commit
91026460e4
1 changed files with 3 additions and 0 deletions
|
|
@ -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"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue