Last active
July 16, 2019 22:25
-
-
Save technocake/0ae3baea61bec186e4eb44b971209238 to your computer and use it in GitHub Desktop.
backup all goto projects
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
# 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