]>
Commit | Line | Data |
---|---|---|
558d2836 A |
1 | #!/bin/sh |
2 | ||
3 | # install | |
4 | # hfs | |
5 | # | |
6 | # Created by Chris Suter on 4/30/15. | |
7 | # | |
8 | ||
9 | if [ ! "$MACHINE" ] ; then | |
10 | echo "MACHINE not specified" | |
11 | exit 1 | |
12 | fi | |
13 | ||
14 | ROOT=hfs-root.tbz | |
15 | ||
16 | # Virtual machine stuff | |
17 | [ "$VM" != "" -a "$VMRUN" != "" ] && { ping -c 1 -t 2 $MACHINE || { | |
18 | VMX="$HOME/Documents/Virtual Machines.localized/$VM.vmwarevm/$VM.vmx" | |
19 | ||
20 | "$VMRUN" revertToSnapshot "$VMX" "Safe" || exit 1 | |
21 | "$VMRUN" start "$VMX" || exit 1 | |
22 | } | |
23 | } | |
24 | ||
25 | rsync -P "$BUILT_PRODUCTS_DIR/$ROOT" $MACHINE: || exit 1 | |
26 | ||
27 | ssh $MACHINE bash -x -s <<EOF | |
28 | sudo darwinup uninstall $ROOT | |
29 | sudo darwinup install $ROOT | |
30 | sudo kextcache -update-volume / | |
31 | sync | |
32 | echo Rebooting... | |
33 | nohup bash -c "sleep 0.6 ; sudo reboot -q" >/dev/null 2>/dev/null </dev/null & | |
34 | sleep 0.3 | |
35 | EOF |