From 0a92eeb5a64a380571dbe9d07b2be120ed7f18cc Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sat, 24 Dec 2016 17:11:23 +0300 Subject: add backup_gitconfig.sh --- .gitattributes | 2 ++ backup_gitconfig.sh | 6 ++++++ 2 files changed, 8 insertions(+) create mode 100755 backup_gitconfig.sh diff --git a/.gitattributes b/.gitattributes index 8334a0a..c3dcd18 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1 +1,3 @@ /%HOME%/**/* text=auto eol=lf + +/*.sh text eol=lf diff --git a/backup_gitconfig.sh b/backup_gitconfig.sh new file mode 100755 index 0000000..30d13ea --- /dev/null +++ b/backup_gitconfig.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash + +set -o errexit -o nounset -o pipefail + +script_dir="$( cd "$( dirname -- "${BASH_SOURCE[0]}" )" && pwd )" +cp --remove-destination -- "$script_dir/%HOME%/.gitconfig" ~ -- cgit v1.2.3