Source files of fsfe.org, pdfreaders.org, freeyourandroid.org, ilovefs.org, drm.info, and test.fsfe.org. Contribute: https://fsfe.org/contribute/web/
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.

build_main.sh 1.7KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. #!/bin/sh
  2. basedir="${0%/*}/.."
  3. [ -z "$inc_misc" ] && . "$basedir/build/misc.sh"
  4. readonly start_time="$(date +%s)"
  5. . "$basedir/build/arguments.sh"
  6. if [ -n "$statusdir" ]; then
  7. mkdir -p "$statusdir"
  8. [ ! -w "$statusdir" -o ! -d "$statusdir" ] && \
  9. die "Unable to set up status directory in \"$statusdir\",\n" \
  10. "either select a status directory that exists and is writable,\n" \
  11. "or run the build script without output to a status directory"
  12. fi
  13. readonly statusdir="${statusdir:+$(realpath "$statusdir")}"
  14. buildpids=$(
  15. ps -eo command \
  16. | egrep "[s]h ${0} .*" \
  17. | wc -l
  18. )
  19. if [ $command = "build_into" -o $command = "svn_build_into" ] && [ "$buildpids" -gt 2 ]; then
  20. debug "build script is already running"
  21. exit 0
  22. fi
  23. [ -z "$inc_filenames" ] && . "$basedir/build/filenames.sh"
  24. [ -z "$inc_buildrun" ] && . "$basedir/build/buildrun.sh"
  25. [ -z "$inc_languages" ] && . "$basedir/build/languages.sh"
  26. [ -z "$inc_makerules" ] && . "$basedir/build/makerules.sh"
  27. [ -z "$inc_processor" ] && . "$basedir/build/processor.sh"
  28. [ -z "$inc_scaffold" ] && . "$basedir/build/scaffold.sh"
  29. [ -z "$inc_sources" ] && . "$basedir/build/sources.sh"
  30. [ -z "$inc_stirrups" ] && . "$basedir/build/stirrups.sh"
  31. case "$command" in
  32. map_tags) map_tags "$@";;
  33. build_into) build_into ;;
  34. svn_build_into) svn_build_into ;;
  35. process_file) process_file "$workfile" "$processor" "$olang" ;;
  36. build_xmlstream) build_xmlstream "$(get_shortname "$workfile")" "$(get_language "$workfile")" "$olang" ;;
  37. tree_maker) tree_maker "$tree" "$target" ;;
  38. sourceglobs) sourceglobs "$sourcesfile" ;;
  39. lang_sources) lang_sources "$sourceglobfile" "$lang" ;;
  40. cast_refglobs) cast_refglobs "$globfile" "$reffile" ;;
  41. wakeup_news) wakeup_news "$today" ;;
  42. esac