Skip to content

Commit

Permalink
add check for pv, rename to yoe_install_image
Browse files Browse the repository at this point in the history
  • Loading branch information
cbrake committed Oct 17, 2018
1 parent 886698f commit 78506f5
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion envsetup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -430,11 +430,20 @@ bitbake() {
# Machine independent install scripts
###############################################################################

yoe_check_install_dependencies() {
if ! pv -V 1>/dev/null; then
echo "ERROR: Please install the pv utility (http://www.ivarch.com/programs/pv.shtml)"
return 1
fi
}

# write a WIC image to media (SD, USB, etc)
yoe_install_wic_image() {
yoe_install_image() {
DRIVE=$1
IMAGE_NAME=$2

yoe_check_install_dependencies || return 1

if [ ! $DRIVE ] || [ ! $IMAGE_NAME ]; then
echo "Usage: yoe_install_wic_image /dev/sdX image_name"
echo "Warning, make sure you specify your SD card and not a workstation disk"
Expand Down

0 comments on commit 78506f5

Please sign in to comment.