From f7b3d92ce5d8e4652b0c7f27a069ba66e997a835 Mon Sep 17 00:00:00 2001 From: pengzhile Date: Wed, 1 Jul 2020 11:03:11 +0800 Subject: [PATCH] update format Signed-off-by: pengzhile --- reset_eval/reset_jetbrains_eval_mac_linux.sh | 40 ++++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/reset_eval/reset_jetbrains_eval_mac_linux.sh b/reset_eval/reset_jetbrains_eval_mac_linux.sh index b0639f9..329be9d 100755 --- a/reset_eval/reset_jetbrains_eval_mac_linux.sh +++ b/reset_eval/reset_jetbrains_eval_mac_linux.sh @@ -4,31 +4,31 @@ OS_NAME=$(uname -s) JB_PRODUCTS="IntelliJIdea CLion PhpStorm GoLand PyCharm WebStorm Rider DataGrip RubyMine AppCode" -if [ $OS_NAME == "Darwin" ]; then - echo 'macOS:' +if [ "$OS_NAME" == "Darwin" ]; then + echo 'macOS:' - for PRD in $JB_PRODUCTS; do - rm -rf ~/Library/Preferences/${PRD}*/eval - rm -rf ~/Library/Application\ Support/JetBrains/${PRD}*/eval - done + for PRD in $JB_PRODUCTS; do + rm -rf ~/Library/Preferences/"${PRD}"*/eval + rm -rf ~/Library/Application\ Support/JetBrains/"${PRD}"*/eval + done - plutil -remove "/.JetBrains\.UserIdOnMachine" ~/Library/Preferences/com.apple.java.util.prefs.plist >/dev/null - plutil -remove "/.jetbrains/.user_id_on_machine" ~/Library/Preferences/com.apple.java.util.prefs.plist >/dev/null - plutil -remove "/.jetbrains/.device_id" ~/Library/Preferences/com.apple.java.util.prefs.plist >/dev/null -elif [ $OS_NAME == "Linux" ]; then - echo 'Linux:' + plutil -remove "/.JetBrains\.UserIdOnMachine" ~/Library/Preferences/com.apple.java.util.prefs.plist >/dev/null + plutil -remove "/.jetbrains/.user_id_on_machine" ~/Library/Preferences/com.apple.java.util.prefs.plist >/dev/null + plutil -remove "/.jetbrains/.device_id" ~/Library/Preferences/com.apple.java.util.prefs.plist >/dev/null +elif [ "$OS_NAME" == "Linux" ]; then + echo 'Linux:' - for PRD in $JB_PRODUCTS; do - rm -rf ~/.${PRD}*/config/eval - rm -rf ~/.config/JetBrains/${PRD}*/eval - done + for PRD in $JB_PRODUCTS; do + rm -rf ~/."${PRD}"*/config/eval + rm -rf ~/.config/JetBrains/"${PRD}"*/eval + done - sed -i '/key="JetBrains\.UserIdOnMachine"/d' ~/.java/.userPrefs/prefs.xml - sed -i '/key="device_id"/d' ~/.java/.userPrefs/jetbrains/prefs.xml - sed -i '/key="user_id_on_machine"/d' ~/.java/.userPrefs/jetbrains/prefs.xml + sed -i '/key="JetBrains\.UserIdOnMachine"/d' ~/.java/.userPrefs/prefs.xml + sed -i '/key="device_id"/d' ~/.java/.userPrefs/jetbrains/prefs.xml + sed -i '/key="user_id_on_machine"/d' ~/.java/.userPrefs/jetbrains/prefs.xml else - echo 'unsupport' - exit + echo 'unsupport' + exit fi echo 'done.'