I'm using bash to make a little program that is using irecovery, a tool for iOS devices and I'm trying to automate the process of using it.
I have created variables that search for files in a specific folder, so other users can use the same program with different files, though the problem is that the variables aren't replaced by the names of the files and so "irecovery" can't access them.
My code looks like this
#!/bin/bash
dtree=$(find Downgrade -type f -iname device*)
ramdisk=$(find Downgrade -type f -name *.dmg)
kernel=$(find Downgrade -type f -iname kernel*)
./irecovery -s <<EOF
/send $dtree
devicetree
/send $ramdisk
ramdisk
/send $kernel
bootx
reboot
EOF
Now how would I get bash to print out the variable before it is used by irecovery, or make irecovery use the variable defined in bash?