rootfs_post_build_script 441 B

12345678910111213141516171819202122
  1. #!/usr/bin/env bash
  2. # This is run as part of:
  3. # make target-finalize
  4. # which gets called by the default target.
  5. # To test it out, arguments can be passed with:
  6. # make BR2_ROOTFS_POST_SCRIPT_ARGS="asdf qwer"
  7. target_dir="$1"
  8. shift
  9. net=true
  10. while getopts 'n' OPT; do
  11. case "$OPT" in
  12. n)
  13. echo asdfqwer
  14. net=false
  15. ;;
  16. esac
  17. done
  18. shift $(($OPTIND - 1))
  19. if ! "$net"; then
  20. rm -f "${target_dir}/etc/init.d/"S*network
  21. fi