Browse Source

More explicit instructions on copying image

Bob Mottram 3 years ago
parent
commit
2f9f5be961
1 changed files with 10 additions and 9 deletions
  1. 10
    9
      src/freedombone-image

+ 10
- 9
src/freedombone-image View File

@@ -697,7 +697,7 @@ Image was created.
697 697
 "
698 698
 fi
699 699
 
700
-ls -lh ${PROJECT_NAME}*.img ${PROJECT_NAME}*.sig ${PROJECT_NAME}*.xz ${PROJECT_NAME}*.vdi ${PROJECT_NAME}*.qcow2
700
+#ls -lh ${PROJECT_NAME}*.img ${PROJECT_NAME}*.sig ${PROJECT_NAME}*.xz ${PROJECT_NAME}*.vdi ${PROJECT_NAME}*.qcow2
701 701
 
702 702
 # Remove the mesh script after use
703 703
 if [[ $VARIANT == "mesh"* ]]; then
@@ -710,16 +710,17 @@ Password: $PASSWORD" > "${CURR_DIR}/${PROJECT_NAME}_login_credentials.txt"
710 710
 chmod 600 "${CURR_DIR}/${PROJECT_NAME}_login_credentials.txt"
711 711
 
712 712
 if [[ $IMAGE_TYPE != "qemu"* ]]; then
713
+    IMAGE_FILENAME=$(find "${CURR_DIR}" -name "*.img" | head -n 1 | awk -F '/' '{print $2}')
714
+
713 715
     echo ''
714
-    if [[ $VARIANT != 'meshclient' && $VARIANT != 'meshusb' ]]; then
715
-        echo $'You can copy the image to a microSD card with:'
716
-    else
717
-        echo $'You can copy the image to a USB drive with:'
718
-    fi
716
+    echo $'To compress:'
717
+    echo ''
718
+    echo "  xz --no-warn --verbose --keep --threads=0 -3 ${IMAGE_FILENAME}"
719
+    echo ''
720
+    echo 'To copy to microSD, USB drive or SSD'
719 721
     echo ''
720
-    echo "    unxz -k ${PROJECT_NAME}*.img.xz"
721
-    echo '    sudo dd if=/dev/zero of=/dev/sdX bs=32M count=8'
722
-    echo "    sudo dd bs=32M if=${PROJECT_NAME}*.img of=/dev/sdX conv=fdatasync,sync,noerror"
722
+    echo '  sudo dd if=/dev/zero of=/dev/sdX bs=32M count=8'
723
+    echo "  sudo dd bs=32M if=${IMAGE_FILENAME} of=/dev/sdX conv=fdatasync,sync,noerror"
723 724
     echo ''
724 725
 fi
725 726