Skip to content

Commit

Permalink
fix mac support
Browse files Browse the repository at this point in the history
  • Loading branch information
saied89 authored and Saeed Momenzadeh committed Sep 8, 2021
1 parent d205dc7 commit e0c3be8
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions install-templates.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit e0c3be8

Please sign in to comment.