# Update an existing ISO.
update: checkroot checkscript
- -./update-iso.ml delete $(ISO)
- ./update-iso.ml add $(ISO) virt-p2v.ml
+ -./iso-attach delete $(ISO)
+ ./iso-attach add $(ISO) virt-p2v.ml
# Check that we are root.
#!/usr/bin/ocamlrun /usr/bin/ocaml
-#load "unix.cma";;
-
-(* update-iso.ml attaches an updated 'virt-p2v.ml' file to the end of
+(* -*- tuareg -*- *)
+(* iso-attach attaches an updated 'virt-p2v.ml' file to the end of
* an ISO image. This is just for quick developer builds because it
* takes ages to rebuild a full ISO.
*
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*)
+#load "unix.cma";;
+
open Printf
open Unix
do_has isoname
| _ ->
eprintf "\
-update-iso.ml add foo.iso file
- Attach 'file' to 'foo.iso'.
+NAME
+
+ iso-attach - Attach files to CD-ROM ISO images.
+
+SYNOPSIS
+
+ iso-attach add foo.iso file
+ Attach 'file' to 'foo.iso'.
+
+ iso-attach delete foo.iso
+ Remove attachment (if any) from 'foo.iso'.
+
+ iso-attach get foo.iso file
+ Get attachment from 'foo.iso' and save it as 'file'.
-update-iso.ml delete foo.iso
- Remove attachment (if any) from 'foo.iso'.
+ iso-attach has foo.iso
+ Exit with 0 (true) if there is an attachment.
+ Exit with 1 (false) if there is no attachment.
+ Exit with 2 if there was some other error, eg. file not found.
-update-iso.ml get foo.iso file
- Get attachment from 'foo.iso' and save it as 'file'.
+DESCRIPTION
-update-iso.ml has foo.iso
- Exit with 0 (true) if there is an attachment.
- Exit with 1 (false) if there is no attachment.
- Exit with 2 if there was some other error, eg. file not found.
+iso-attach attaches an updated 'virt-p2v.ml' file to the end of
+an ISO image. This is just for quick developer builds because it
+takes ages to rebuild a full ISO.
Note that attachments are stacked, so you can add more than one
attachment. In this case 'get' operation returns the most recently