mirror of
https://github.com/elliotnunn/tbxi-patches.git
synced 2025-03-03 04:29:41 +00:00
Neat new script for copying to HFS Standard volumes
This commit is contained in:
parent
57ac21ae75
commit
a2dfc8d98d
23
autocopystd.sh
Executable file
23
autocopystd.sh
Executable file
@ -0,0 +1,23 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
REMOTE=Alpha
|
||||||
|
|
||||||
|
sudo true # get password out of way
|
||||||
|
|
||||||
|
echo -n Waiting for "$REMOTE"...
|
||||||
|
while [ -z "$DEVNODE" ]; do
|
||||||
|
DEVNODE="$(diskutil list external | grep "$REMOTE" | head -n1 | awk '{print $NF}')"
|
||||||
|
if [ -z "$DEVNODE" ]; then sleep 0.15; fi
|
||||||
|
done
|
||||||
|
|
||||||
|
DEVNODE="/dev/$DEVNODE"
|
||||||
|
sudo diskutil unmountDisk $DEVNODE
|
||||||
|
sudo hmount $DEVNODE
|
||||||
|
for x in "$@"; do
|
||||||
|
sudo hcopy "$x" ':System Folder:'
|
||||||
|
done
|
||||||
|
humount
|
||||||
|
sync
|
||||||
|
|
||||||
|
echo -n -e "\a"
|
||||||
|
say copied
|
Loading…
x
Reference in New Issue
Block a user