aboutsummaryrefslogtreecommitdiff
path: root/install
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2022-04-04 15:54:26 +0200
committerKarel Kočí <cynerd@email.cz>2022-04-04 17:54:18 +0200
commit7e8cc7201949ad75daca5520c57479229711ed31 (patch)
tree544b15a25f53ba4923eff7e813732ab8ba81a996 /install
parent0cf542815d11b09e411a00267c89180e28623991 (diff)
downloadshellrc-7e8cc7201949ad75daca5520c57479229711ed31.tar.gz
shellrc-7e8cc7201949ad75daca5520c57479229711ed31.tar.bz2
shellrc-7e8cc7201949ad75daca5520c57479229711ed31.zip
Add flake.nix
Diffstat (limited to 'install')
-rwxr-xr-xinstall19
1 files changed, 17 insertions, 2 deletions
diff --git a/install b/install
index cd42670..f54b249 100755
--- a/install
+++ b/install
@@ -60,20 +60,35 @@ fi
if $U_DESKTOP; then
mkdir -p "$I_PREFIX/usr/share/shellrc"
- cp -r shellrc.d-desktop/. "$I_PREFIX/usr/share/shellrc/"
+ cp -r shellrc-desktop.d/. "$I_PREFIX/usr/share/shellrc/"
fi
if $U_BASH; then
mkdir -p "$I_PREFIX/etc/bash"
cp -r bashrc.d/. "$I_PREFIX/etc/bash/bashrc.d"
+ cat >"$I_PREFIX/etc/bash/bashrc.d/shellrc" <<-"EOF"
+ for sh in /usr/share/shellrc/*; do
+ [ -r "$sh" ] && . "$sh"
+ done
+ EOF
mkdir -p "$I_PREFIX/usr/share/bash-completion/completions"
cp -r bash-completion/. "$I_PREFIX/usr/share/bash-completion/completions/"
fi
if $U_ZSH; then
mkdir -p "$I_PREFIX/etc/zsh"
- cp zshrc "$I_PREFIX/etc/zsh/zshrc"
+ cat >"$I_PREFIX/etc/zsh/zshrc" <<-"EOF"
+ [[ -o interactive ]] || return # skip on initialization if not interactive
+ for sh in /etc/zsh/zshrc.d/*; do
+ [ -r "$sh" ] && . "$sh"
+ done
+ EOF
cp -r zshrc.d/. "$I_PREFIX/etc/zsh/zshrc.d"
+ cat >"$I_PREFIX/etc/zsh/zshrc.d/shellrc" <<-"EOF"
+ for sh in /usr/share/shellrc/*; do
+ [ -r "$sh" ] && . "$sh"
+ done
+ EOF
mkdir -p "$I_PREFIX/usr/share/zsh/site-functions"
cp -r zsh-completion/. "$I_PREFIX/usr/share/zsh/site-functions"
fi