[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Lost] [Patch] lpt cfg-addlib und cfg-addinc



+ lpt: cfg-addinc und cfg-addlib Befehle

-- 
Antoine Kaufmann
<toni@xxxxxxxxxxxxxxxx>
Index: src/modules/pas/lpt/lpt.pas
===================================================================
--- src/modules/pas/lpt/lpt.pas	(Revision 900)
+++ src/modules/pas/lpt/lpt.pas	(Arbeitskopie)
@@ -299,6 +299,24 @@ begin
     c_lostio_create_link(@path[1], @pubname[1], False);
 end;
 
+procedure CfgAddlib(path, pubname: String);
+begin
+    path := path + #0;
+    pubname := 'file:/system/lib/' + pubname + #0;
+
+    mkpath('file:/system/lib/');
+    c_lostio_create_link(@path[1], @pubname[1], False);
+end;
+
+procedure CfgAddinc(path, pubname: String);
+begin
+    path := path + #0;
+    pubname := 'file:/system/include/' + pubname + #0;
+
+    mkpath('file:/system/include/');
+    c_lostio_create_link(@path[1], @pubname[1], False);
+end;
+
 begin
     if system.ParamCount < 1 then begin
         PrintUsage;
@@ -323,6 +341,20 @@ begin
             WriteLn('Falsche Parameterzahl');
             PrintUsage;
         end;
+    end else if system.ParamStr(1) = 'cfg-addlib' then begin
+        if system.ParamCount = 3 then begin
+            CfgAddlib(system.ParamStr(2), system.ParamStr(3));
+        end else begin
+            WriteLn('Falsche Parameterzahl');
+            PrintUsage;
+        end;
+    end else if system.ParamStr(1) = 'cfg-addinc' then begin
+        if system.ParamCount = 3 then begin
+            CfgAddinc(system.ParamStr(2), system.ParamStr(3));
+        end else begin
+            WriteLn('Falsche Parameterzahl');
+            PrintUsage;
+        end;
     end else begin
         WriteLn('Ungueltige Aktion: ', system.ParamStr(1));
         PrintUsage;

Attachment: pgpzmMVWmMvyv.pgp
Description: PGP signature