Browse Source

dd_prololive_auto.sh

master
Robin Thoni 8 years ago
parent
commit
44392feab0
1 changed files with 27 additions and 0 deletions
  1. 27
    0
      dd_prololive_auto.sh

+ 27
- 0
dd_prololive_auto.sh View File

@@ -0,0 +1,27 @@
1
+#! /usr/bin/env sh
2
+
3
+devices=""
4
+
5
+check_devices()
6
+{
7
+  devices_tmp=$(ls /dev | grep -E '^sd[a-z]$')
8
+  if [ "${devices}" != "${devices_tmp}" ]
9
+  then
10
+    devices="${devices_tmp}"
11
+    echo "${devices}"
12
+    echo -n "Enter device to dump: "
13
+    read device
14
+    if [ "${device}" != "" ]
15
+    then
16
+      ./dd_prololive.sh "${device}"
17
+    else
18
+      echo "Doing nothing"
19
+    fi
20
+  fi
21
+}
22
+
23
+while :;
24
+do
25
+  check_devices
26
+  sleep 0.1
27
+done

Loading…
Cancel
Save