Changeset 755 for soft


Ignore:
Timestamp:
Jan 7, 2016, 10:48:54 PM (8 years ago)
Author:
cfuguet
Message:

Improving the create_dmg script to search the mkfs.vfat tool in
UNIX standard directories when it's not in the PATH.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • soft/giet_vm/create_dmg

    r364 r755  
    108108
    109109                        echo "Creating empty disk image: $2"
     110                        let "sectors = (sectors - 1) / 2"
    110111
    111                         let "sectors = (sectors - 1) / 2"
    112                     mkfs.vfat \
     112                        CREATE_DISK=$(command -v mkfs.vfat ||\
     113                                      command -v /sbin/mkfs.vfat ||\
     114                                      command -v /usr/sbin/mkfs.vfat ||\
     115                                      command -v /usr/local/sbin/mkfs.vfat)
     116
     117                        if [ -z ${CREATE_DISK} ]; then
     118                                echo "error: command mkfs.vfat not found";
     119                                exit 1;
     120                        fi;
     121
     122                        ${CREATE_DISK} \
    113123                                -C \
    114124                                -F32 \
Note: See TracChangeset for help on using the changeset viewer.