diff --git a/install-templates.sh b/install-templates.sh index 1c003be50..3c012c9aa 100755 --- a/install-templates.sh +++ b/install-templates.sh @@ -6,16 +6,16 @@ OS="$(uname -s)" echo "Installing Workflow file templates on $OS system..." ideaConfigPath="" if [[ "$OS" == Linux ]]; then - ideaConfigPath='.config' + ideaConfigPath="$HOME/.config" elif [[ "$OS" == Darwin ]]; then - ideaConfigPath="Library/Application\ Support" + ideaConfigPath="$HOME/Library/Application Support" fi TEMPLATES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/fileTemplates" - -for i in $HOME/$ideaConfigPath/Google/AndroidStudio* \ - $HOME/$ideaConfigPath/JetBrains/IdeaIC* \ - $HOME/$ideaConfigPath/JetBrains/IntelliJIdea* +for i in "$ideaConfigPath"/Google/AndroidStudio* \ + "$ideaConfigPath"/JetBrains/IdeaIC* \ + "$ideaConfigPath"/JetBrains/IntelliJIdea* do + echo $i if [[ -d "$i" ]]; then mkdir -p "$i/fileTemplates" cp -frv "$TEMPLATES"/* "$i/fileTemplates"