aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2016-12-24 17:11:23 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2016-12-24 17:11:23 +0300
commit0a92eeb5a64a380571dbe9d07b2be120ed7f18cc (patch)
tree377345440aa95f7a75174bb1b0fcef616c3435f5
parentfix .gitattributes (diff)
downloadlinux-home-0a92eeb5a64a380571dbe9d07b2be120ed7f18cc.tar.gz
linux-home-0a92eeb5a64a380571dbe9d07b2be120ed7f18cc.zip
add backup_gitconfig.sh
Diffstat (limited to '')
-rw-r--r--.gitattributes2
-rwxr-xr-xbackup_gitconfig.sh6
2 files changed, 8 insertions, 0 deletions
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" ~