Magellan Linux

Contents of /trunk/mlivecdbuild/profiles/alx-0_6_branch/usb-install/usb-install.cmd

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1818 - (show annotations) (download)
Fri May 4 08:23:02 2012 UTC (11 years, 11 months ago) by niro
File size: 3032 byte(s)
-added usbstick installation script and tools
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 if exist ..\livecdrootfs.sqsh (
41 echo - ..\livecdrootfs.sqsh
42 copy ..\livecdrootfs.sqsh %DRIVE%\ >nul || goto error
43 ) else (
44 echo ..\livecdrootfs.sqsh not found
45 goto error
46 )
47
48 md %DRIVE%\system || goto error
49 if exist ..\system\alx-i486.tar.bz2 (
50 echo - ..\system\alx-i486.tar.bz2
51 copy ..\system\alx-i486.tar.bz2 %DRIVE%\system >nul || goto error
52 ) else (
53 echo ..\system\alx-i486.tar.bz2 not found
54 goto error
55 )
56 if exist ..\system\images.conf (
57 echo - ..\system\images.conf
58 copy ..\system\images.conf %DRIVE%\system >nul || goto error
59 ) else (
60 echo ..\system\images.conf not found
61 goto error
62 )
63
64 if exist ..\isolinux\boot.cat (
65 echo - ..\isolinux\boot.cat
66 copy ..\isolinux\boot.cat %DRIVE%\ >nul || goto error
67 ) else (
68 echo ..\isolinux\boot.cat not found
69 goto error
70 )
71 if exist ..\isolinux\boot.lss (
72 echo - ..\isolinux\boot.lss
73 copy ..\isolinux\boot.lss %DRIVE%\ >nul || goto error
74 ) else (
75 echo ..\isolinux\boot.lss not found
76 goto error
77 )
78 if exist ..\isolinux\boot.msg (
79 echo - ..\isolinux\boot.msg
80 copy ..\isolinux\boot.msg %DRIVE%\ >nul || goto error
81 ) else (
82 echo ..\isolinux\boot.msg not found
83 goto error
84 )
85 if exist ..\isolinux\help.msg (
86 echo - ..\isolinux\help.msg
87 copy ..\isolinux\help.msg %DRIVE%\ >nul || goto error
88 ) else (
89 echo ..\isolinux\help.msg not found
90 goto error
91 )
92 if exist ..\isolinux\initrd.gz (
93 echo - ..\isolinux\initrd.gz
94 copy ..\isolinux\initrd.gz %DRIVE%\ >nul || goto error
95 ) else (
96 echo ..\isolinux\initrd.gz not found
97 goto error
98 )
99 if exist ..\isolinux\magelive (
100 echo - ..\isolinux\magelive
101 copy ..\isolinux\magelive %DRIVE%\ >nul || goto error
102 ) else (
103 echo ..\isolinux\magelive not found
104 goto error
105 )
106
107 echo.
108 echo Finished!
109 goto end
110
111 : usage
112 echo.
113 echo Usage:
114 echo %0 [drive letter]
115 echo.
116 echo Example: %0 m:
117 goto end
118
119 : aborted
120 echo Aborted!
121 goto end
122
123 : notexist
124 echo Drive '%DRIVE%' does not exist!
125 goto end
126
127 : error
128 echo An error occured. Aborted.
129 goto end
130
131 : end

Properties

Name Value
svn:executable *