|
|
- #!/bin/bash
-
- usb=$1
- part=`echo $usb`1
- rsync="rsync --delete -rvtDW --progress --modify-window=1"
-
- if [ -z $1 ]
- then
- echo "Usage: sudo ./prepare-usb.sh <device>"
- exit 1
- fi
-
- if [ $UID -gt 0 ]
- then
- echo "Please run as root."
- echo "Usage: sudo ./prepare-usb.sh <device>"
- exit 1
- fi
-
- ## Install Ventoy
- ventoy -i /dev/$usb -L MH-USB -I -g
- sleep 20
-
- OS_FOR_16GB="
- alpine-standard-3.15.0-x86_64.iso
- debian-live-11.2.0-amd64-cinnamon.iso
- Fedora-Workstation-Live-x86_64-35-1.2.iso
- LibreELEC-Generic.x86_64-10.0.1.img
- manjaro-kde-21.2.1-minimal-220103-linux515.iso
- netboot.xyz.iso
- openwrt-21.02.0-x86-64-generic-ext4-combined.img
- systemrescue-9.00-amd64.iso
- tails-amd64-4.26.img
- trisquel-mini_9.0.1_amd64.iso
- ubuntu-20.04.3-desktop-amd64.iso"
-
- RPi_FOR_16GB="
- 2021-10-30-raspios-bullseye-armhf-lite.zip
- LibreELEC-RPi4.arm-10.0.1.img.gz"
-
- TOOLS_FOR_16GB="
- imager_1.6.1.exe
- imager_amd64.AppImage
- ungoogled-chromium_91.0.4472.164-1.1.AppImage"
-
- ## Copy ISOs
- mkdir -p /mnt/mhusb/
- mount /dev/$part /mnt/mhusb
- mkdir -p /mnt/mhusb/{OS,Tools}
-
- cd MH-USB/OS/
- time $rsync $OS_FOR_16GB /mnt/mhusb/OS/
-
- cd ../Tools/
- time $rsync $TOOLS_FOR_16GB /mnt/mhusb/Tools/
-
- cd ../
- time $rsync ventoy /mnt/mhusb
-
- ## cd ../RPi/
- ## $rsync $RPi_FOR_16GB /mnt/mhusb/RPi/
-
- echo "Done."
|