Commit hnyman's changes
[lede.git] / hnscripts / mountNcopy.sh
diff --git a/hnscripts/mountNcopy.sh b/hnscripts/mountNcopy.sh
new file mode 100755 (executable)
index 0000000..510c852
--- /dev/null
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# mount & copy  -  Mount the Virtualbox shared folder and copy files to PC
+
+Mounttype=vboxsf
+Mountname=PCSHARE
+Mountpoint=/media/windows-share
+BinDir=bin/targets/ipq806x/generic
+
+echo Check for existing mount of the shared folder $Mountpoint
+df | grep $Mountpoint
+if [ "$?" -ne 0 ]; then
+  echo Mounting $Mountpoint as $Mountname...
+  sudo mount -t $Mounttype $Mountname $Mountpoint
+  [ "$?" -ne 0 ] && echo "Sudo/mount failed." && exit 1
+fi
+
+echo "\nCopy from $PWD ..."
+cp $BinDir/*tar $Mountpoint
+sleep 2
+cp $BinDir/*img $Mountpoint
+sleep 2
+cp $BinDir/*patch $Mountpoint
+sleep 1
+cp $BinDir/*sh $Mountpoint
+sleep 1
+cp $BinDir/*manifest $Mountpoint
+sleep 1
+cp $BinDir/*txt $Mountpoint
+sleep 1
+cp $BinDir/*config* $Mountpoint
+echo done.
+