Created
August 19, 2017 18:53
-
-
Save EtienneM/3334ed350d932e3233bb7a2d2999c117 to your computer and use it in GitHub Desktop.
This file contains 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
#!/bin/bash | |
# | |
# Script de sauvegarde d'éléments qui ne peuvent pas être envoyé sur le dépôt Git | |
# | |
set -o nounset | |
CUR_DIR=$(cd $(dirname $0) && pwd) | |
cd $CUR_DIR | |
if [[ $# -ne 1 ]]; then | |
echo "Usage: $0 backup_directory" >&2 | |
exit 1 | |
fi | |
if ! [[ -d "$1" ]]; then | |
echo "$1 not a directory" >&2 | |
echo "Usage: $0 backup_directory" >&2 | |
exit 1 | |
fi | |
mkdir $1/ssh | |
cp $HOME/.ssh/id_rsa* $1/ssh | |
mkdir $1/gnupg | |
cp -R $HOME/.gnupg $1/gnupg | |
mkdir $1/scalingo | |
cp -R $HOME/.scalingo/s3cfg_deployment_cache_production $HOME/.scalingo/vpn * $1/scalingo | |
mkdir $1/zsh | |
cp $HOME/.zsh_history $1/zsh/zsh_history | |
cp $HOME/.config $1/config |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment