Mercurial > hg > zsh-env
changeset 170:95e349996727
Add a script for setting up the shell environment on a naked home.
Use a global .hgrc that has a hook for local includes per machine.
author | Dirk Olmes <dirk.olmes@codedo.de> |
---|---|
date | Sat, 04 Apr 2020 03:53:18 +0200 |
parents | 2cc8820caae0 |
children | 707364297b3a |
files | hgrc setup.sh |
diffstat | 2 files changed, 45 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/hgrc Sat Apr 04 03:53:18 2020 +0200 @@ -0,0 +1,25 @@ +# +# ATTENTION +# This is the universal .hgrc. For host specific changes rather make changes +# to ~/.hgrc.local +# + +[extensions] +hgext.graphlog = +pager = +progress = +rebase = +shelve = + +[hostsecurity] +minimumprotocol = tls1.2 +# anstatt hostsecurity.xanthippe hier zu pflegen, als checkout url xanthippe.duckdns.org nutzen! + +[pager] +attend = diff help log + +[ui] +color = no +username = Dirk Olmes <dirk.olmes@codedo.de> + +%include ~/.hgrc.local
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/setup.sh Sat Apr 04 03:53:18 2020 +0200 @@ -0,0 +1,20 @@ +#!/bin/bash +# +# setup the shell env on a new, naked host +# +cd $HOME + +replace_with_link() { + local target="$1" + local source="$2" + + if [[ -f $target ]]; then + rm $target + fi + ln -s $source $target +} + +replace_with_link .zshrc .zsh-env/zshrc +replace_with_link .hgrc .zsh-env/hgrc +replace_with_link .nanorc .zsh-env/.nanorc +replace_with_link .screenrc .zsh-env/.screenrc