Skip to content

Commit

Permalink
add linux file template instalation
Browse files Browse the repository at this point in the history
  • Loading branch information
saied89 authored Sep 5, 2021
1 parent de7f495 commit 8e85cec
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions install-templates.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
#!/bin/bash
# Installs Workflow file templates for IntelliJ and Android Studio.

echo "Installing Workflow file templates..."

OS="$(uname -s)"
echo "Installing Workflow file templates on $OS system..."
ideaConfigPath=""
if [[ "$OS" == Linux ]]; then
ideaConfigPath='.config'
elif [[ "$OS" == Darwin ]]; then
ideaConfigPath="Library/Application\ Support"
fi
TEMPLATES="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )/fileTemplates"

for i in $HOME/Library/Application\ Support/Google/AndroidStudio* \
$HOME/Library/Application\ Support/JetBrains/IdeaIC*
for i in $HOME/$ideaConfigPath/Google/AndroidStudio* \
$HOME/$ideaConfigPath/JetBrains/IdeaIC*
do
if [[ -d "$i" ]]; then
mkdir -p "$i/fileTemplates"
Expand All @@ -16,4 +23,4 @@ done

echo "Done."
echo ""
echo "Restart IntelliJ and/or AndroidStudio."
echo "Restart IntelliJ and/or AndroidStudio."

0 comments on commit 8e85cec

Please sign in to comment.