mirror of
https://github.com/elliotnunn/tbxi-patches.git
synced 2024-12-13 11:29:03 +00:00
Arbitrary file copy to remote disk
This commit is contained in:
parent
00a3db5bf0
commit
9ec6321412
20
autocopy.sh
20
autocopy.sh
@ -1,9 +1,19 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
REMOTE_DISK_NAME=Alpha
|
REMOTE=/Volumes/Alpha
|
||||||
|
|
||||||
until mount | grep -q "/Volumes/$REMOTE_DISK_NAME"; do sleep 0.15; done
|
echo -n Waiting for "$REMOTE"...
|
||||||
rm -f "/Volumes/$REMOTE_DISK_NAME/System Folder/Mac OS ROM"
|
until mount | grep -q "$REMOTE"; do sleep 0.15; done
|
||||||
binhex -o "/Volumes/$REMOTE_DISK_NAME/System Folder/Mac OS ROM" $<
|
echo ok
|
||||||
diskutil unmountDisk force /dev/`diskutil info /Volumes/Alpha/ | grep "Part of Whole" | sed 's/.*:\s*//'`
|
|
||||||
|
for x in "$@"; do
|
||||||
|
td="$(mktemp -d)"
|
||||||
|
binhex -C "$td" "$x" # hack to find out file name!
|
||||||
|
rm -f "$REMOTE/System Folder/$(ls "$td")"
|
||||||
|
rm -rf "$td"
|
||||||
|
binhex -C "$REMOTE/System Folder/" "$x"
|
||||||
|
done
|
||||||
|
|
||||||
|
diskutil unmountDisk force /dev/`diskutil info "$REMOTE" | grep "Part of Whole" | tr '[[:space:]]' '\n' | tail -n1`
|
||||||
|
echo -n -e "\a"
|
||||||
say copied
|
say copied
|
||||||
|
Loading…
Reference in New Issue
Block a user