bin/update-e2b: add ability to provide new ISOs
This commit is contained in:
parent
68ef1c1bcb
commit
8b48a11960
|
@ -1,9 +1,11 @@
|
||||||
#!/bin/sh
|
#!/bin/sh -e
|
||||||
# Update an Easy2Boot USB Stick after adding ISOs
|
# Update an Easy2Boot USB Stick after adding ISOs
|
||||||
# To be called with target as arg
|
# Call with Linux ISOs to be copied as args
|
||||||
dir="${1:-${MNT:-${XDG_RUNTIME_DIR}/mnt}/E2B}"
|
# Need to be around E2B mountpoint if it is not the default
|
||||||
find "$dir" -name "*32-*.iso" -exec mv -v {} {}def32 \;
|
dir="$(find -maxdepth 2 -name E2B -type d | grep . || echo "${MNT:-${XDG_RUNTIME_DIR}/mnt}/E2B")"
|
||||||
find "$dir" -name "*.iso" -exec mv -v {} {}def64 \;
|
test $# -eq 0 || mv -vi "$@" "$dir/_ISO/LINUX"
|
||||||
|
find "$dir" -name "*32-*.iso" -exec mv -vi {} {}def32 \;
|
||||||
|
find "$dir" -name "*.iso" -exec mv -vi {} {}def64 \;
|
||||||
drive=$(mount | grep "$dir" | cut -d' ' -f1)
|
drive=$(mount | grep "$dir" | cut -d' ' -f1)
|
||||||
sudo umount $drive
|
sudo umount $drive
|
||||||
sudo udefrag $drive
|
sudo udefrag $drive
|
||||||
|
|
Loading…
Reference in New Issue