diff options
Diffstat (limited to 'examples/hooks')
-rwxr-xr-x | examples/hooks/minimal.chroot | 2 | ||||
-rwxr-xr-x | examples/hooks/stripped.chroot | 4 | ||||
-rwxr-xr-x | examples/hooks/symlinks.chroot | 22 |
3 files changed, 25 insertions, 3 deletions
diff --git a/examples/hooks/minimal.chroot b/examples/hooks/minimal.chroot index 5a9a8d648..70af0dd40 100755 --- a/examples/hooks/minimal.chroot +++ b/examples/hooks/minimal.chroot @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it diff --git a/examples/hooks/stripped.chroot b/examples/hooks/stripped.chroot index 9ebe5bc12..fe3f6cacb 100755 --- a/examples/hooks/stripped.chroot +++ b/examples/hooks/stripped.chroot @@ -1,7 +1,7 @@ #!/bin/sh ## live-build(7) - System Build Scripts -## Copyright (C) 2006-2013 Daniel Baumann <daniel@debian.org> +## Copyright (C) 2006-2012 Daniel Baumann <daniel@debian.org> ## ## This program comes with ABSOLUTELY NO WARRANTY; for details see COPYING. ## This is free software, and you are welcome to redistribute it @@ -31,7 +31,7 @@ done apt-get autoremove --yes || true # Removing unused files -find . -name *~ -print0 | xargs -0 rm -f +find . -name *~ | xargs rm -f rm -rf /usr/include/* #rm -rf /usr/share/groff/* diff --git a/examples/hooks/symlinks.chroot b/examples/hooks/symlinks.chroot new file mode 100755 index 000000000..b0f2eea47 --- /dev/null +++ b/examples/hooks/symlinks.chroot @@ -0,0 +1,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 |