summaryrefslogtreecommitdiff
path: root/examples/hooks/symlinks.chroot
blob: b0f2eea478f7d495f29f32174773ced6a269546a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/bin/sh

# This is a hook for live-build(7) to install localepurge.
# To enable it, copy or symlink this hook into your config/chroot_local-hooks
# directory.
#

_PURGE=""

if [ ! -x "$(which symlinks 2>/dev/null)" ]
then
	_PURGE="true"

	apt-get install symlinks
fi

symlinks -c -r -s /

if [ "${_PURGE}" = "true" ]
then
	apt-get remove --purge symlinks
fi