Changeset b919871 in umon


Ignore:
Timestamp:
Jul 13, 2015, 11:25:20 PM (4 years ago)
Author:
Jarielle Catbagan <jcatbagan93@…>
Branches:
master
Children:
5bed147
Parents:
812918d
git-author:
Jarielle Catbagan <jcatbagan93@…> (07/13/15 23:25:20)
git-committer:
Ed Sutter <edsutterjr@…> (07/13/15 23:25:20)
Message:

BBB: sd_setup.sh: Change /bin/bash -> /bin/sh to solely adhere to POSIX shell constructs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • ports/beagleboneblack/sd_setup.sh

    r812918d rb919871  
    1 #!/bin/bash
     1#!/bin/sh
    22#
    33# This script automates the process of setting up an SD card for
     
    55
    66if [ $# -ne 2 ]; then
    7         echo -e  "Please specify both the boot mode and the SD card to set up\n"
    8         echo -e "Usage: ./sd_setup.sh <boot mode> /dev/<device>\n"
    9         echo -e "where <boot mode> is either RAW or FAT and <device> is the SD card"
     7        printf  "Please specify both the boot mode and the SD card to set up\n"
     8        printf "Usage: ./sd_setup.sh <boot mode> /dev/<device>\n"
     9        printf "where <boot mode> is either RAW or FAT and <device> is the SD card"
    1010        exit 1
    1111fi
     
    1717RAW)
    1818        if [ ! -e ./build_BEAGLEBONEBLACK/rawboot.bin ]; then
    19                 echo -e "rawboot.bin does not exist in ./build_BEAGLEBONEBLACK\n"
    20                 echo -e "Please build uMon before proceeding"
     19                printf "rawboot.bin does not exist in ./build_BEAGLEBONEBLACK\n"
     20                printf "Please build uMon before proceeding"
    2121                exit 1
    2222        fi
     
    3333FAT)
    3434        if [ ! -e ./build_BEAGLEBONEBLACK/MLO ]; then
    35                 echo -e "MLO does not exist in ./build_BEAGLEBONEBLACK\n"
    36                 echo -e "Please build uMon before proceeding"
     35                printf "MLO does not exist in ./build_BEAGLEBONEBLACK\n"
     36                printf "Please build uMon before proceeding"
    3737                exit 1
    3838        fi
     
    4242
    4343        # Create the FAT16 primary partition and mark it bootable
    44         echo -e "n\np\n1\n\n+3M\nt\n6\na\n1\nw\n" | fdisk ${SDDEV}
     44        printf "n\np\n1\n\n+3M\nt\n6\na\n1\nw\n" | fdisk ${SDDEV}
    4545
    4646        # Wait for some time to allow the partition to register under /dev
     
    5858        ;;
    5959*)
    60         echo -e "Invalid boot mode specified.  Valid boot modes are RAW/FAT."
     60        printf "Invalid boot mode specified.  Valid boot modes are RAW/FAT."
    6161        exit 1
    6262        ;;
Note: See TracChangeset for help on using the changeset viewer.