Add install-static element
This element currently exists in tripleo-image-elements but it is plenty useful without tripleo. Change-Id: I2415f53191773fafece485bdd3c706a2625a0a47
This commit is contained in:
parent
807e89f063
commit
162f60edf0
7
elements/install-static/README.md
Normal file
7
elements/install-static/README.md
Normal file
@ -0,0 +1,7 @@
|
||||
Copy static files into the built image.
|
||||
|
||||
The contents of any ``static/`` subdirs of elements will be installed into
|
||||
these images at build time using ``rsync -lCr``. So to install a file
|
||||
``/etc/boo``, include ``static/etc/boo`` in your element.
|
||||
|
||||
Note: This installs all files with owner and group of root.
|
11
elements/install-static/install.d/10-install-static-files
Executable file
11
elements/install-static/install.d/10-install-static-files
Executable file
@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
# Note that this relies on the detail that all elements share one dir inside
|
||||
# the chroot. This will copy all the files that elements have added to
|
||||
# element/static into the image. Mode, symlinks etc will be respected.
|
||||
set -eux
|
||||
set -o pipefail
|
||||
|
||||
STATIC_SOURCE="$(dirname $0)/../static"
|
||||
[ -d "${STATIC_SOURCE}" ] || exit 0
|
||||
|
||||
rsync -lCr "${STATIC_SOURCE}"/ /
|
Loading…
Reference in New Issue
Block a user