Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/scripts/909_modularized b/scripts/909_modularized
- new file mode 100644
- index 0000000..9944109
- --- /dev/null
- +++ b/scripts/909_modularized
- @@ -0,0 +1,35 @@
- +#--------------------------------------------------------------------------------------------------
- +# Standard modularization template
- +# --------------------------------
- +#
- +# The script will start execution from <QTDIR>.
- +#
- +# Available variables:
- +# $qtdir = <QTDIR> or where you started the modularize script from
- +# $basepath = path for the modularize script, and basepath for the modularization repo
- +# $OStype = <n> where <n> is one of 0 = Windows, 1 = Unix, 2 = Mac
- +#
- +# To execute a command:
- +# run("git mv foo bar") # runs command, reports error possition and dies
- +# runNotDie("git mv foo bar") # runs command, reports error possition, returns error code
- +# and continues. Use ($? >> 8) to get the real exit code.
- +# ensureDir("qtkernel") # Ensures that qtkernel exists and is a directory. Will create
- +# it if it does not exist.
- +#--------------------------------------------------------------------------------------------------
- +
- +# Ensure that the mother repo <QTDIR>/qt is created
- +# any by default use that as the repo base for the modules
- +my $motherdir = "qt";
- +my $repos_base = $qtdir . "/" . $motherdir;
- +my $modularizeddir = "modularized";
- +my $modularized_base = $qtdir . "/" . $modularizeddir;
- +ensureDir($modularizeddir);
- +
- +#-- generate mother repo
- +chdir($modularizeddir);
- +foreach my $module (@repos) {
- + print("Modularized for $module.");
- + run("git clone --bare ../$motherdir/$module $module.git");
- +}
- +
- +return 1;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement