X-Git-Url: https://ruderich.org/simon/gitweb/?a=blobdiff_plain;f=setup.sh;h=d96f5df14cdc1e323a88194531e82997ec20509a;hb=75e0616f82cd0b9e057692c065ada56de2b4f321;hp=b1b14de21a0c1e9830ad9bc2c92f23f39a7ccb7c;hpb=6de4a52bedfdf81e90186d9c4e100b56815ddad5;p=config%2Fdotfiles.git diff --git a/setup.sh b/setup.sh index b1b14de..d96f5df 100755 --- a/setup.sh +++ b/setup.sh @@ -66,7 +66,8 @@ chmod 0600 ~/.less # Custom colors for GNU ls. if installed dircolors; then - dircolors -b shell/dircolors.in > shell/dircolors + echo '# WARNING! DO NOT EDIT THIS FILE!' > shell/dircolors + dircolors -b shell/dircolors.in >> shell/dircolors fi # Find the required options to get colored ls output. GNU ls is preferred. See @@ -126,8 +127,7 @@ if echo test | grep --color=auto test >/dev/null 2>&1; then : else echo 'shell/aliases: removing grep --color=auto' - sed '/^alias grep=/ s/^/#/' shell/aliases > shell/aliases.tmp - mv shell/aliases.tmp shell/aliases + sed_i '/^alias grep=/ s/^/#/' shell/aliases fi generate cat screenrc .in @@ -162,9 +162,8 @@ if terminal_available screen-256color; then fi if test -z "$use_256colors"; then echo screenrc: removing 256 colors - sed 's/Enable 256 color/Disable 256 color/; - s/screen-256color/screen/' screenrc > screenrc.tmp - mv screenrc.tmp screenrc + sed_i 's/Enable 256 color/Disable 256 color/; + s/screen-256color/screen/' screenrc fi # Some options are only necessary when running as root. They are marked as # "(ROOT)". @@ -185,8 +184,7 @@ fi # it's installed. if installed rxvt; then echo screenrc: removing attrcolor \"fix\" - sed 's/attrcolor b ".I"/#attrcolor b ".I"/' screenrc > screenrc.tmp - mv screenrc.tmp screenrc + sed_i 's/attrcolor b ".I"/#attrcolor b ".I"/' screenrc fi # Display current battery charge on computers with a battery. Necessary lines # are marked as "(BATTERY)". @@ -215,15 +213,13 @@ if installed tmux; then # 256 colors not available. if test -z "$use_256colors"; then echo tmux.conf: removing 256 colors - sed 's/Enable 256 color/Disable 256 color/; - s/screen-256color/screen/' tmux.conf > tmux.conf.tmp - mv tmux.conf.tmp tmux.conf + sed_i 's/Enable 256 color/Disable 256 color/; + s/screen-256color/screen/' tmux.conf fi # Tmux doesn't display a warning if the shell wasn't found! if test ! -x '/bin/zsh'; then echo tmux.conf: removing /bin/zsh as shell - sed 's/zsh/sh/' tmux.conf > tmux.conf.tmp - mv tmux.conf.tmp tmux.conf + sed_i 's/zsh/sh/' tmux.conf fi fi