Commit hnyman's changes
[lede.git] / hnscripts / mountNcopy.sh
1 #!/bin/sh
2 #
3 # mount & copy  -  Mount the Virtualbox shared folder and copy files to PC
4
5 Mounttype=vboxsf
6 Mountname=PCSHARE
7 Mountpoint=/media/windows-share
8 BinDir=bin/targets/ipq806x/generic
9
10 echo Check for existing mount of the shared folder $Mountpoint
11 df | grep $Mountpoint
12 if [ "$?" -ne 0 ]; then
13   echo Mounting $Mountpoint as $Mountname...
14   sudo mount -t $Mounttype $Mountname $Mountpoint
15   [ "$?" -ne 0 ] && echo "Sudo/mount failed." && exit 1
16 fi
17
18 echo "\nCopy from $PWD ..."
19 cp $BinDir/*tar $Mountpoint
20 sleep 2
21 cp $BinDir/*img $Mountpoint
22 sleep 2
23 cp $BinDir/*patch $Mountpoint
24 sleep 1
25 cp $BinDir/*sh $Mountpoint
26 sleep 1
27 cp $BinDir/*manifest $Mountpoint
28 sleep 1
29 cp $BinDir/*txt $Mountpoint
30 sleep 1
31 cp $BinDir/*config* $Mountpoint
32 echo done.
33