Modules/InitRD - Fixed files.lst format
authorJohn Hodge <[email protected]>
Tue, 19 Feb 2013 09:16:15 +0000 (17:16 +0800)
committerJohn Hodge <[email protected]>
Tue, 19 Feb 2013 09:16:15 +0000 (17:16 +0800)
KernelLand/Modules/Filesystems/InitRD/GenerateInitRD.php
KernelLand/Modules/Filesystems/InitRD/files.lst

index 5119442..44c005a 100644 (file)
@@ -47,8 +47,12 @@ foreach($lines as $line)
                continue;
        }
        // File
-       if(preg_match('/^File\s+"([^"]+)"\s+"([^"]+)"$/', $line, $matches))
+       if(preg_match('/^File\s+"([^"]+)"(?:\s+"([^"]+)")?$/', $line, $matches))
        {
+               if( !isset($matches[2]) ) {
+                       $matches[2] = $matches[1];
+                       $matches[1] = basename($matches[2]);
+               }
                $lStack[$lDepth][1][] = array($matches[1], $matches[2]);
                continue;
        }
index 5b17070..469923c 100644 (file)
@@ -1,45 +1,46 @@
 Dir "SBin" {
-       File "init" "__BIN__/SBin/init"
-       File "login" "__BIN__/SBin/login"
-       File "telnetd" "__BIN__/SBin/telnetd"
+       File "__BIN__/SBin/init"
+       File "__BIN__/SBin/login"
+       File "__BIN__/SBin/telnetd"
 }
 Dir "Bin" {
-       File "CLIShell" "__BIN__/Bin/CLIShell"
-       File "ls" "__BIN__/Bin/ls"
-       File "cat" "__BIN__/Bin/cat"
-       File "mount" "__BIN__/Bin/mount"
-       File "lspci" "__BIN__/Bin/lspci"
-       File "ip" "__BIN__/Bin/ip"
-       File "ping" "__BIN__/Bin/ping"
-       File "telnet" "__BIN__/Bin/telnet"
-       File "irc" "__BIN__/Bin/irc"
-       File "bomb" "__BIN__/Bin/bomb"
-       File "dhcpc" "__BIN__/SBin/dhcpc"
+       File "__BIN__/Bin/CLIShell"
+       File "__BIN__/Bin/ls"
+       File "__BIN__/Bin/cat"
+       File "__BIN__/Bin/mount"
+       File "__BIN__/Bin/lspci"
+       File "__BIN__/Bin/ip"
+       File "__BIN__/Bin/ping"
+       File "__BIN__/Bin/telnet"
+       File "__BIN__/Bin/irc"
+       File "__BIN__/Bin/bomb"
+       File "__BIN__/SBin/dhcpc"
 }
 Dir "Libs" {
-       File "ld-acess.so" "__BIN__/Libs/ld-acess.so"
-       File "libld-acess.so" "__BIN__/Libs/libld-acess.so"
-       File "libc.so" "__BIN__/Libs/libc.so"
-       File "libreadline.so" "__BIN__/Libs/libreadline.so"
-       File "libnet.so" "__BIN__/Libs/libnet.so"
-       File "liburi.so" "__BIN__/Libs/liburi.so"
-       File "libimage_sif.so" "__BIN__/Libs/libimage_sif.so"
-       File "libaxwin3.so" "__BIN__/Libs/libaxwin3.so"
-       File "libposix.so" "__BIN__/Libs/libposix.so"
-       File "libpsocket.so" "__BIN__/Libs/libpsocket.so"
-       File "libunicode.so" "__BIN__/Libs/libunicode.so"
+       File "__BIN__/Libs/ld-acess.so"
+       File "__BIN__/Libs/libld-acess.so"
+       File "__BIN__/Libs/libc.so"
+       File "__BIN__/Libs/libreadline.so"
+       File "__BIN__/Libs/libnet.so"
+       File "__BIN__/Libs/liburi.so"
+       File "__BIN__/Libs/libimage_sif.so"
+       File "__BIN__/Libs/libaxwin3.so"
+       File "__BIN__/Libs/libposix.so"
+       File "__BIN__/Libs/libpsocket.so"
+       File "__BIN__/Libs/libunicode.so"
 }
 Dir "Conf" {
-       File "inittab" "__FS__/Conf/inittab"
+       File "__FS__/Conf/inittab"
 }
 Dir "Apps" {
        Dir "AxWin" {
                Dir "3.0" {
-                       File "AxWinWM" "__BIN__/Apps/AxWin/3.0/AxWinWM"
-                       File "AxWinUI" "__BIN__/Apps/AxWin/3.0/AxWinUI"
-                       File "ate" "__BIN__/Apps/AxWin/3.0/ate"
-                       File "terminal" "__BIN__/Apps/AxWin/3.0/terminal"
-                       File "AcessLogoSmall.sif" "__SRC__/Usermode/Applications/axwin3_src/AcessLogoSmall.sif"
+                       File "__BIN__/Apps/AxWin/3.0/AxWinWM"
+                       File "__BIN__/Apps/AxWin/3.0/AxWinUI"
+                       File "__BIN__/Apps/AxWin/3.0/ate"
+                       File "__BIN__/Apps/AxWin/3.0/terminal"
+                       File "__SRC__/Usermode/Applications/axwin3_src/AcessLogoSmall.sif"
+                       File "toolbar_new.sif" "__SRC__/Usermode/Applications/axwin3_src/WM/resources/.toolbar_new.sif"
                }
        }
 }

UCC git Repository :: git.ucc.asn.au