common.inc.sh 712 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. config() {
  2. :
  3. }
  4. try_config() {
  5. :
  6. }
  7. device() {
  8. :
  9. }
  10. factory_image() {
  11. :
  12. }
  13. sysupgrade_image() {
  14. :
  15. }
  16. alias() {
  17. :
  18. }
  19. manifest_alias() {
  20. :
  21. }
  22. packages() {
  23. :
  24. }
  25. factory() {
  26. :
  27. }
  28. sysupgrade() {
  29. :
  30. }
  31. no_opkg() {
  32. :
  33. }
  34. unknown_devices="$DEVICES"
  35. want_device() {
  36. [ "$DEVICES" ] || return 0
  37. local new_devices=''
  38. for device in $unknown_devices; do
  39. if [ "$device" != "$1" ]; then
  40. new_devices="${new_devices:+${new_devices} }$device"
  41. fi
  42. done
  43. unknown_devices=$new_devices
  44. for device in $DEVICES; do
  45. if [ "$device" = "$1" ]; then
  46. return 0
  47. fi
  48. done
  49. return 1
  50. }
  51. check_devices() {
  52. if [ "$unknown_devices" ]; then
  53. echo "Error: unknown devices given: ${unknown_devices}" >&2
  54. exit 1
  55. fi
  56. }