Skip to content

Instantly share code, notes, and snippets.

@technocake
Last active July 16, 2019 22:25
Show Gist options
  • Save technocake/0ae3baea61bec186e4eb44b971209238 to your computer and use it in GitHub Desktop.
Save technocake/0ae3baea61bec186e4eb44b971209238 to your computer and use it in GitHub Desktop.
backup all goto projects
# add to .bash_profile / .bashrc / .zshrc
function backupgoto {
foldername=$(date +%d%m%y)
target="${HOME}/gotobackup/${foldername}"
mkdir -p "$target"
cp -r ${HOME}/.goto "$target" \
&& echo "Backuped goto to $target" \
|| echo "Failed to backup goto"
}
# Usage:
# $ backupgoto
# Backuped goto to /Users/technocake/gotobackup/180519
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment