From 6767deb6a27d0cee8132d4bec937e44cb7842312 Mon Sep 17 00:00:00 2001 From: Tom Willemse Date: Tue, 21 Jan 2014 22:55:20 +0100 Subject: [PATCH] Ensure the bin directory exists --- sti | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/sti b/sti index c9e2a99..12327de 100755 --- a/sti +++ b/sti @@ -88,6 +88,12 @@ function cmd_install () tool_name=$(basename $1 .git) tool_home="${data_home}/tools/${tool_name}" + # Ensure the bin directory exists. + if [[ ! -d "$bin_home" ]]; then + echo "Creating directory ${bin_home}" + mkdir -p "$bin_home" + fi + if [[ ! -d "$tool_home" ]]; then git clone $1 "$tool_home" cmd_reinit "$tool_name"