Advertisement
Guest User

Untitled

a guest
Jul 22nd, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.73 KB | None | 0 0
  1. diff --git a/scripts/909_modularized b/scripts/909_modularized
  2. new file mode 100644
  3. index 0000000..9944109
  4. --- /dev/null
  5. +++ b/scripts/909_modularized
  6. @@ -0,0 +1,35 @@
  7. +#--------------------------------------------------------------------------------------------------
  8. +# Standard modularization template
  9. +# --------------------------------
  10. +#
  11. +# The script will start execution from <QTDIR>.
  12. +#
  13. +# Available variables:
  14. +# $qtdir = <QTDIR> or where you started the modularize script from
  15. +# $basepath = path for the modularize script, and basepath for the modularization repo
  16. +# $OStype = <n> where <n> is one of 0 = Windows, 1 = Unix, 2 = Mac
  17. +#
  18. +# To execute a command:
  19. +# run("git mv foo bar") # runs command, reports error possition and dies
  20. +# runNotDie("git mv foo bar") # runs command, reports error possition, returns error code
  21. +# and continues. Use ($? >> 8) to get the real exit code.
  22. +# ensureDir("qtkernel") # Ensures that qtkernel exists and is a directory. Will create
  23. +# it if it does not exist.
  24. +#--------------------------------------------------------------------------------------------------
  25. +
  26. +# Ensure that the mother repo <QTDIR>/qt is created
  27. +# any by default use that as the repo base for the modules
  28. +my $motherdir = "qt";
  29. +my $repos_base = $qtdir . "/" . $motherdir;
  30. +my $modularizeddir = "modularized";
  31. +my $modularized_base = $qtdir . "/" . $modularizeddir;
  32. +ensureDir($modularizeddir);
  33. +
  34. +#-- generate mother repo
  35. +chdir($modularizeddir);
  36. +foreach my $module (@repos) {
  37. + print("Modularized for $module.");
  38. + run("git clone --bare ../$motherdir/$module $module.git");
  39. +}
  40. +
  41. +return 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement