2 myip=$(ip a|grep -o 'inet 10\.1\.1\.[0-9]\+'|cut -d ' ' -f 2)
3 mypath=$(readlink --canonicalize $PWD/$(dirname $0)/../build/gumstix/_compiled)
5 if [ ! -d "$mypath" ]; then
6 echo "$0: error: Cannot find $mypath"
10 if [ -z "$myip" ]; then
11 echo "$0: error: You do not seem to be connected to the GUMSTIX"
12 echo "Your IP address should be 10.1.1.xxx"
18 if ! grep -q $mypath /var/lib/nfs/etab; then
19 sudo exportfs -o ro,no_subtree_check,no_root_squash 10.1.1.2:$mypath
22 mount_point="/tmp/$USER@$myip"
24 if [ "$1" = "-u" ]; then
25 cmd="umount $mount_point"
27 cmd="mkdir -p $mount_point && mount -o nolock $myip:$mypath $mount_point"
30 ssh root@10.1.1.2 $cmd
31 if [ "$1" = "-c" ]; then
32 ssh root@10.1.1.2 /home/bin/copy_from $mount_point