summarylogtreecommitdiffstats
path: root/jupyter_contrib_nbextensions.install
blob: d708eb8bbd5621718cb4e16ea47213519a20a80a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
fpath='/etc/jupyter/jupyter_notebook_config.json'
jpath='.NotebookApp.nbserver_extensions.jupyter_nbextensions_configurator'

if [[ -f "$fpath" ]]; then
	content=$(cat "$fpath")
else
	content='{}'
fi

post_install() {
	echo "$content" | jq "$jpath = true" >"$fpath"
}
post_upgrade() {
	post_install
}

pre_remove() {
	echo "$content" | jq "del($jpath)" >"$fpath"
}