cp was not recursive whan copying files on USB key

This commit is contained in:
Yorick Barbanneau 2016-10-10 17:59:12 +02:00
parent 63ad27b2f5
commit 806ac8f282

View file

@ -147,19 +147,17 @@ then
create_dir $MOUNT_DIR
mount ${dest}1 $MOUNT_DIR
echo "copying all file to USB drive"
cp ${TMP_DIR}/* $MOUNT_DIR &> /dev/null
sync
cp -R ${TMP_DIR}/* $MOUNT_DIR &> /dev/null
umount $MOUNT_DIR
echo Unmounting key, please wait ...
sleep 5
# Make key bootable if bios.
if [[ $BOOT_TYPE == "bios" ]]
then
# In this mode, we need to write syslinux MBR.
echo "Writing syslinux mbr.ini fo $dest"
dd bs=440 count=1 conv=notrunc if=${syslinux_mod}/${BOOT_TYPE}/mbr.bin of=${dest}
sleep 5
#cd ${TMP_DIR}/syslinux-${SYSLINUX_VERSION}/bios/linux/
syslinux --directory syslinux --install ${dest}1
cd $current_dir
fi
exit 0
fi