Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (24 sloc) 1.31 KB
#!/usr/bin/env bash
# Create a code checkpoint before domino sync
# This is an extra layer of protection over version control.
# If the sync fails and somehow demands a reset or what-have-you, this might save you.
# To create a one-click safe domino sync on mac osx dock, do the following:
# 1. chmod this file so it is executable
# 2. Rename it with .app extension
# 3. Drag into mac dock
# 4. Rename back to original .sh extension
# 5. In finder, right click on "Get Info"and under "Open with" menu, select the terminal application
# Unfortunately you'll have to repeat the last step every time you edit this file as your IDE will likely revert it.
# Usage:
# <project>
declare -a dirs=("lib" ) # <--- Add to this list
# 1. Make a copy of your code:
# <label> <code_dir> <checkpoint_directory>
/bin/bash ${src_dir}/bash/ "sync" "${src_dir}" "${src_checkpoint_dir}" # <---- Assumes location of in /<src_dir>/bash/ modify as needed
# 2. And only then sync
cd "${src_dir}"
domino sync || echo "Your sync failed somehow. If needed, you can retrieve code from ${src_checkpoint_dir}"