Skip to content

Commit

Permalink
add custom idea properties
Browse files Browse the repository at this point in the history
  • Loading branch information
prontera committed Nov 17, 2017
1 parent f18c51f commit 11b0f61
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
Empty file modified build.sh
100644 → 100755
Empty file.
25 changes: 25 additions & 0 deletions idea-pros-path.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash
# 该脚本的作用是自定义idea的配置文件和插件的位置
# author: prontera@github

#set -x
set -eo pipefail
shopt -s nullglob

idea_pros_path=$HOME/.idea.properties

if [[ -e $HOME/.zshrc ]]; then
if ! grep -q IDEA_PROPERTIES "$HOME/.zshrc"; then
echo -e write it to zshrc
echo "export IDEA_PROPERTIES=${idea_pros_path}" >> $HOME/.zshrc
fi
fi
if [[ -e $HOME/.bashrc ]];then
if ! grep -q IDEA_PROPERTIES "$HOME/.bashrc"; then
echo -e write it to bashrc
echo "export IDEA_PROPERTIES=${idea_pros_path}" >> $HOME/.bashrc
fi
fi

echo "$(tput setaf 2)>>> "Done!" $(tput sgr0)"
exit 0

0 comments on commit 11b0f61

Please sign in to comment.