Contents of /trunk/mlivecdbuild/profiles/alx-0_7_branch/usb-install/usb-install.cmd
Parent Directory | Revision Log
Revision 2893 -
(show annotations)
(download)
Tue Nov 3 14:19:13 2015 UTC (8 years, 7 months ago) by niro
File size: 3067 byte(s)
Tue Nov 3 14:19:13 2015 UTC (8 years, 7 months ago) by niro
File size: 3067 byte(s)
-fix installation with the new iso layout
1 | @echo off |
2 | |
3 | echo ####################################### |
4 | echo ## ALX USB Installation Script ## |
5 | echo ## ## |
6 | echo ## Warning: all data will be erased! ## |
7 | echo ####################################### |
8 | |
9 | :: check prerequisites |
10 | if not exist syslinux.exe ( |
11 | echo 'syslinux' not found |
12 | goto error |
13 | ) |
14 | |
15 | set DRIVE=%1 |
16 | if "%DRIVE%" == "" goto usage |
17 | |
18 | echo. |
19 | echo Stick location: '%DRIVE%' |
20 | echo. |
21 | echo Warning: all data on %DRIVE% will be erased! |
22 | set QUESTION= |
23 | set /p QUESTION=Enter 'yes' to continue or anything else to abort: |
24 | |
25 | if not "%QUESTION%" == "yes" goto aborted |
26 | if not exist %DRIVE% goto notexist |
27 | |
28 | echo Formating Disk: %DRIVE% ... |
29 | format %DRIVE% /FS:FAT32 /Q /Y >nul || goto error |
30 | echo Writing bootloader ... |
31 | syslinux -a -m -i %DRIVE% >nul || goto error |
32 | echo Copying files ... |
33 | if exist syslinux.cfg ( |
34 | echo - syslinux.cfg |
35 | copy syslinux.cfg %DRIVE%\ >nul || goto error |
36 | ) else ( |
37 | echo syslinux.cfg not found |
38 | goto error |
39 | ) |
40 | |
41 | md %DRIVE%\LiveOS |
42 | if exist ..\LiveOS\squashfs.img ( |
43 | echo - ..\LiveOS\squashfs.img |
44 | copy ..\LiveOS\squashfs.img %DRIVE%\LiveOS >nul || goto error |
45 | ) else ( |
46 | echo ..\LiveOS\squashfs.img not found |
47 | goto error |
48 | ) |
49 | |
50 | md %DRIVE%\system || goto error |
51 | if exist ..\system\alx-i486.tar.bz2 ( |
52 | echo - ..\system\alx-i486.tar.bz2 |
53 | copy ..\system\alx-i486.tar.bz2 %DRIVE%\system >nul || goto error |
54 | ) else ( |
55 | echo ..\system\alx-i486.tar.bz2 not found |
56 | goto error |
57 | ) |
58 | if exist ..\system\images.conf ( |
59 | echo - ..\system\images.conf |
60 | copy ..\system\images.conf %DRIVE%\system >nul || goto error |
61 | ) else ( |
62 | echo ..\system\images.conf not found |
63 | goto error |
64 | ) |
65 | |
66 | if exist ..\isolinux\boot.cat ( |
67 | echo - ..\isolinux\boot.cat |
68 | copy ..\isolinux\boot.cat %DRIVE%\ >nul || goto error |
69 | ) else ( |
70 | echo ..\isolinux\boot.cat not found |
71 | goto error |
72 | ) |
73 | if exist ..\isolinux\boot.lss ( |
74 | echo - ..\isolinux\boot.lss |
75 | copy ..\isolinux\boot.lss %DRIVE%\ >nul || goto error |
76 | ) else ( |
77 | echo ..\isolinux\boot.lss not found |
78 | goto error |
79 | ) |
80 | if exist ..\isolinux\boot.msg ( |
81 | echo - ..\isolinux\boot.msg |
82 | copy ..\isolinux\boot.msg %DRIVE%\ >nul || goto error |
83 | ) else ( |
84 | echo ..\isolinux\boot.msg not found |
85 | goto error |
86 | ) |
87 | if exist ..\isolinux\help.msg ( |
88 | echo - ..\isolinux\help.msg |
89 | copy ..\isolinux\help.msg %DRIVE%\ >nul || goto error |
90 | ) else ( |
91 | echo ..\isolinux\help.msg not found |
92 | goto error |
93 | ) |
94 | if exist ..\isolinux\initrd.gz ( |
95 | echo - ..\isolinux\initrd.gz |
96 | copy ..\isolinux\initrd.gz %DRIVE%\ >nul || goto error |
97 | ) else ( |
98 | echo ..\isolinux\initrd.gz not found |
99 | goto error |
100 | ) |
101 | if exist ..\isolinux\magelive ( |
102 | echo - ..\isolinux\magelive |
103 | copy ..\isolinux\magelive %DRIVE%\ >nul || goto error |
104 | ) else ( |
105 | echo ..\isolinux\magelive not found |
106 | goto error |
107 | ) |
108 | |
109 | echo. |
110 | echo Finished! |
111 | goto end |
112 | |
113 | : usage |
114 | echo. |
115 | echo Usage: |
116 | echo %0 [drive letter] |
117 | echo. |
118 | echo Example: %0 m: |
119 | goto end |
120 | |
121 | : aborted |
122 | echo Aborted! |
123 | goto end |
124 | |
125 | : notexist |
126 | echo Drive '%DRIVE%' does not exist! |
127 | goto end |
128 | |
129 | : error |
130 | echo An error occured. Aborted. |
131 | goto end |
132 | |
133 | : end |
Properties
Name | Value |
---|---|
svn:executable | * |