gluon/scripts/common.inc.sh

79 lines
734 B
Bash
Raw Normal View History

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