Created
February 11, 2020 14:21
-
-
Save jeystaats/49548886aaaf12b48754fb0920f00ad5 to your computer and use it in GitHub Desktop.
Sync insomnia locally
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
echo "Copying insomnia settings" | |
files=("Settings" "Workspace" "Request" "RequestGroup" "RequestMeta" "RequestGroupMeta" "WorkspaceMeta" "Stats" "RequestVersion") | |
# Look for signs of trouble in each log | |
for i in ${!files[@]}; | |
do | |
file=${files[$i]} | |
cp /Users/USERNAME/Library/'Application Support'/Insomnia/insomnia.${file}.db ~/Projects/insomnia/insomnia.${file}.db | |
echo " - Copied ${file}" | |
done | |
cd ~/Projects/insomnia && git add . && git commit -m "Update settings" && git push | |
echo "Syncing" | terminal-notifier -title Insomnia -subtitle "Synchronising" -message "Completed synchronising to Github" -appIcon https://s3.amazonaws.com/s3.roaringapps.com/assets/icons/1561251841927-Insomnia.png | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment