if [ -n "$COPYDIR" ]; then log "Copying files from $COPYDIR to device..." cp -a "$COPYDIR"/. "$MNT"/ sync fi