summarylogtreecommitdiffstats
path: root/zim.install
blob: f70b40525e1a3920c4713b6f0bdb5be640f231ed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/bin/bash

post_install() {
	compile_scripts
	echo
	echo "Zim is enabled for all users by default."
	echo "To change that, edit /etc/zsh/zshrc file."
	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/"
	echo
}

post_upgrade() {
	compile_scripts
}

post_remove() {
	remove_compiled_scripts
}

compile_scripts() {
	zsh -c 'source /usr/lib/zim/templates/{zshrc,zlogin}'
}

remove_compiled_scripts() {
	find /usr/lib/zim -name "*.zwc" | xargs rm -f
}