[wpkg-users] Suggestion of new argument: /pkgroot

Thomas Bøge Nielsen thomas at itx.dk
Thu Jan 9 11:30:42 CET 2014


Suggestion: Addition of additional command line switch: /pkgroot:<pathtofilename>


In some environments using wpkg package definition syntax is much more flexible than writing long scripts to do what wpkg does so great.
We are using wpkg to install packages one by one directly from a local directory, apart from the central location of wpkg. Therefore, we need to be able to specify a specific pakcage-directory on the commandline. We have developed (what i nice word for a 2-line patch) to the current 1.3.0 release, allowing us to do so.

I kindly ask this patch (or an improved version if anyone find that smarter) to be included in further releases.

/Thomas Bøge






--- D:/Downloads/wpkg.js Thu Dec 08 15:03:24 2011
+++ D:/Downloads/wpkg-itx.js Thu Jan 09 11:21:06 2014
@@ -8024,7 +8024,8 @@

  // get argument list
  var argv = getArgv();
-
+ var argn = argv.Named;
+
  // Will be used for file operations.
  var fso = new ActiveXObject("Scripting.FileSystemObject");

@@ -8059,6 +8060,7 @@
  // Append the settings file names to the end of the base path.
  packages_file = fso.BuildPath(base, packages_file_name);
  var packages_folder = fso.BuildPath(base, "packages");
+ if (argn.Item("pkgroot") != null)  {packages_folder = argn.Item("pkgroot")};
  profiles_file = fso.BuildPath(base, profiles_file_name);
  var profiles_folder = fso.BuildPath(base, "profiles");
  hosts_file = fso.BuildPath(base, hosts_file_name);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.wpkg.org/pipermail/wpkg-users/attachments/20140109/6bd03008/attachment-0002.html>


More information about the wpkg-users mailing list