This repository has been archived by the owner on Nov 19, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 20
/
jetbrains-backup.sh
executable file
·54 lines (39 loc) · 2.41 KB
/
jetbrains-backup.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
#!/usr/bin/env bash
set -u
FILE=~/Desktop/JetBrains-$(date "+%Y%m%d-%H%M%S").tar.xz
if [ "$(uname -s)" != "Darwin" ] ; then
echo "Sorry, $(uname -s) is not supported yet."
exit 1
fi
# Clear Application Saved States JetBrains
tar pf "$FILE" --append ~/Library/Saved\ Application\ State/com.jetbrains.* &>/dev/null
tar pf "$FILE" --append ~/Library/Preferences/jetbrains.* &>/dev/null
tar pf "$FILE" --append ~/Library/Application\ Support/com.apple.sharedfilelist/com.apple.LSSharedFileList.ApplicationRecentDocuments/com.jetbrains.* &>/dev/null
tar pf "$FILE" --append ~/Library/Application\ Support/CrashReporter/* &>/dev/null
# DataGrip (0xDBE10)
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/{DataGrip,0xDBE}{??,???,20??.*,-EAP} &>/dev/null
# AppCode
tar pf "$FILE" --append ~/Library/Preferences,Caches,Application\ Support,Logs/appCode{??,???,20??.*,-EAP} &>/dev/null
# CLion
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/{c,C}{l,L}ion{??,???,20??.*,-EAP} &>/dev/null
# GoLand
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/Go{gl,L}and{?.?} &>/dev/null
# IntelliJ IDEA
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/IntelliJIdea{??,???,20??.*,-EAP} &>/dev/null
# IntelliJ IDEA Community Edition
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/IdeaIC{??,???,20??.*,-EAP} &>/dev/null
# PhpStorm
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/{PhpStorm,WebIde}{??,???,20??.*,-EAP} &>/dev/null
# PyCharm
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/PyCharm{??,???,20??.*,-EAP} &>/dev/null
# PyCharm Educational Edition
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/PyCharmEdu{??,???,20??.*,-EAP} &>/dev/null
# Rider
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/Rider{??,???,20??.*,-EAP} &>/dev/null
# RubyMine
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/RubyMine{??,???,20??.*,-EAP} &>/dev/null
# WebStorm
tar pf "$FILE" --append ~/Library/{Preferences,Caches,Application\ Support,Logs}/WebStorm{?,??,20??.*,-EAP} &>/dev/null
echo 'Check backup all data before deleting the product'
echo "The configuration backup is successfully created: $FILE (size: $(du -sh "$FILE" | cut -f1))"
# open -R $FILE