summarylogtreecommitdiffstats
path: root/zim.install
diff options
context:
space:
mode:
authorMateusz Galazyn2021-01-11 22:29:20 +0100
committerMateusz Galazyn2021-01-11 22:29:20 +0100
commit5a378e94d516c57d39629de545b78b0f020d86a4 (patch)
tree1e33aeb40a8c7d2576580f12774ec9cf2554a102 /zim.install
parent1b9e3e9a772a2e95ef63f9bf69db7798aaa6d7d5 (diff)
downloadaur-5a378e94d516c57d39629de545b78b0f020d86a4.tar.gz
Update for new packaging of zsh-zim
Diffstat (limited to 'zim.install')
-rw-r--r--zim.install7
1 files changed, 4 insertions, 3 deletions
diff --git a/zim.install b/zim.install
index 0e04de43a0eb..9b6695f9aae9 100644
--- a/zim.install
+++ b/zim.install
@@ -1,10 +1,11 @@
#!/bin/bash
post_install() {
- compile_scripts
+ [[ -f ~root/.zimrc ]] || ln -s /etc/zsh/zimrc ~root/.zimrc
+ compile_scripts
echo
echo "Zim is enabled for all users by default."
- echo "To change that, edit /etc/zsh/zshrc file."
+ echo "~/.zimrc was symlinked to /etc/zsh/zimrc for root (if it was not present)"
echo "Global settings reside in the /etc/zsh/ directory."
echo "To personalize Zsh and zim, edit your local ~/.zshrc and ~/.zimrc files."
echo "A user can also have a custom, overriding Zim installation in ~/.zim/"
@@ -20,7 +21,7 @@ post_remove() {
}
compile_scripts() {
- zsh -c 'source /usr/lib/zim/templates/zshrc; source /usr/lib/zim/templates/zlogin;'
+ zsh -c 'export ZIM_HOME=/usr/lib/zim; source /etc/zsh/zshrc; source /usr/lib/zim/templates/zlogin;'
}
remove_compiled_scripts() {