summaryrefslogtreecommitdiff
path: root/build_rootfs.sh
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2018-02-27 23:29:59 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2018-02-27 23:29:59 +0100
commit40bffd9fce4002b48149bf690b0275d2e7e0aca1 (patch)
tree63624399fef1d0fbd645646566094247f63a6f14 /build_rootfs.sh
parentee39be73b3e59bcd89816e3b38f5bb99da324b12 (diff)
Include extra files and fix output option
Diffstat (limited to 'build_rootfs.sh')
-rwxr-xr-xbuild_rootfs.sh11
1 files changed, 8 insertions, 3 deletions
diff --git a/build_rootfs.sh b/build_rootfs.sh
index 4eb172a..2c1a7ce 100755
--- a/build_rootfs.sh
+++ b/build_rootfs.sh
@@ -3,20 +3,22 @@
set -e
usage() {
- echo "Usage: $0 [-o|--output <dst file>] <src tar> <metadata.yaml>"
+ echo "Usage: $0 [-o|--output <dst file>] [-p|--packages <packages>] [-f|--files <files>] <src tar> <metadata.yaml>"
exit 1
}
dst_file=/dev/stdout
-temp=$(getopt -o "o:p:" -l "output:,packages:,help" -- "$@")
+temp=$(getopt -o "o:p:f:" -l "output:,packages:,files:,help" -- "$@")
eval set -- "$temp"
while true; do
case "$1" in
-p|--packages)
packages="$2"; shift 2;;
- -o)
+ -o|--output)
dst_file="$2"; shift 2;;
+ -f|--files)
+ files="$2"; shift 2;;
--help)
usage;;
--)
@@ -117,6 +119,9 @@ install_packages() {
unpack
add_files $files_dir $instroot
+if test -n "$files"; then
+ add_files $files $instroot
+fi
add_file $metadata $metadata_dir $dir
add_files templates/ $dir/templates/
add_packages bin/packages/${ARCH}/${SUBARCH}