diff options
Diffstat (limited to 'gittify.install')
-rw-r--r-- | gittify.install | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/gittify.install b/gittify.install new file mode 100644 index 000000000000..d7b235dca14e --- /dev/null +++ b/gittify.install @@ -0,0 +1,20 @@ +post_install() { + cat /etc/gittify/gitconfig.base | sed 's/#.*//g' | gawk '{ sub(/[\t ]*/, ""); if (/\[(.*)\]/) { prefix=substr($0, 2, length()-2); } else if ($0 ~ /[^\t ]/) { print prefix"."$0; } }' | sed 's/ = /\n/' | while read name; do + read value; + if git config --system "$name" > /dev/null; then + echo "Config[$name] already exists. Ignoring it." + else + echo "Config[name=$name] -> $value"; + git config --system "$name" "$value" + fi + done + echo "Done. Run gittify in any git repo to start." +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + return; +} |