gluon/scripts/common.inc.sh
Matthias Schiffer 7460431faa
scripts/copy_output.sh: add support for "extra" images
The new extra_image command allows to copy additional images that don't
fall into the sysupgrade or factory categories to the output directory.
These images will be placed in the "other" subdirectory.

The extra_image command takes 3 arguments: in_suffix (suffix in OpenWrt
bin directory), out_suffix (suffix in Gluon output directory) and ext (file
extension). Example:

  extra_image '-tftp' '-tftp' '.bin'

The ext argument can be omitted to control the whole filename suffix
including the extension from in_suffix and out_suffix. Multiple extra_image
commands can be used for a single device; aliases work as usual.

Based-on-patch-by: David Bauer <mail@david-bauer.net>
2018-07-14 18:33:37 +02:00

79 lines
734 B
Bash

config() {
:
}
try_config() {
:
}
device() {
:
}
factory_image() {
:
}
sysupgrade_image() {
:
}
alias() {
:
}
manifest_alias() {
:
}
packages() {
:
}
factory() {
:
}
sysupgrade() {
:
}
extra_image() {
:
}
no_opkg() {
:
}
unknown_devices="$DEVICES"
want_device() {
[ "$DEVICES" ] || return 0
local new_devices=''
for device in $unknown_devices; do
if [ "$device" != "$1" ]; then
new_devices="${new_devices:+${new_devices} }$device"
fi
done
unknown_devices=$new_devices
for device in $DEVICES; do
if [ "$device" = "$1" ]; then
return 0
fi
done
return 1
}
check_devices() {
if [ "$unknown_devices" ]; then
echo "Error: unknown devices given: ${unknown_devices}" >&2
exit 1
fi
}