From 91026460e4f954b8fd3aa63900adb332a12265a7 Mon Sep 17 00:00:00 2001 From: Shivam Mathur Date: Fri, 22 Sep 2023 08:15:57 +0530 Subject: [PATCH] Create tool_path_dir if it does not exist --- src/scripts/tools/add_tools.sh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/scripts/tools/add_tools.sh b/src/scripts/tools/add_tools.sh index c8cb1985..9d9edf37 100644 --- a/src/scripts/tools/add_tools.sh +++ b/src/scripts/tools/add_tools.sh @@ -130,6 +130,9 @@ add_tool() { tool=$2 ver_param=$3 tool_path="$tool_path_dir/$tool" + if ! [ -d "$tool_path_dir" ]; then + sudo mkdir -p "$tool_path_dir" + fi add_path "$tool_path_dir" if [ -e "$tool_path" ]; then sudo cp -aL "$tool_path" /tmp/"$tool"