mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
770 B

  1. #!/bin/sh
  2. # create the list for cpio-entries to be used by gen_cpio_init
  3. # shall be called by mkinitramfs.sh only.
  4. # sources each file in ./build.d/
  5. if [ -z "$irfs_libexec_functions" ]
  6. then
  7. echo "sorry - some required functions are not declared."
  8. echo "you need to source the 'functions' script first."
  9. echo "try: source `dirname $0`/functions"
  10. exit 1
  11. fi
  12. if [ -z "$builddir" ]
  13. then
  14. echo "\$builddir variable is not set."
  15. exit 1
  16. fi
  17. if [ -z "$TMPDIR" ]
  18. then
  19. echo "\$TMPDIR variable is not set."
  20. exit 1
  21. fi
  22. mkdir -pv $TMPDIR/targetdir
  23. # now go through the build.d directory
  24. for x in $builddir/[0-9][0-9]*
  25. do
  26. echo
  27. echo "sourcing $x ($scriptopt)" >&2
  28. # use the same environment for each script
  29. ( cd $TMPDIR/targetdir ; eval $scriptopt ; . $x )
  30. done | sort -u