-
Notifications
You must be signed in to change notification settings - Fork 14
/
pullCameraImagesVideos.sh
executable file
·53 lines (45 loc) · 1.33 KB
/
pullCameraImagesVideos.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
# Created by Sujay Davalgi
#
# Displays the list of files (Images & Videos captured from camera) from device and saves the selected file to the bugs folder
#
# Usage: ./pullCameraImagesVideos.sh [<Device Serial>]
# Command line Arguments (Optional):
# $1 - Input the device serial
# If the serial number is not provided, it will display the list of attached devices to pick from
. ./library/mainFunctions.sh
. ./library/textFormatting.sh
. ./library/deviceOperations.sh
. ./library/deviceFileOperations.sh
SearchForFile="*.{jpg,mp4}"
if [ $# -lt 2 ]; then
if [ $# -lt 1 ]; then
getDeviceChoice
else
buildDeviceSnArray
deviceSerial="$1"
SearchForFile="*.{jpg,mp4}"
fi
displaySelectedDevice $deviceSerial
#if [ $# -lt 1 ]; then
# getDeviceChoice
# displaySelectedDevice $deviceSerial
#else
# buildDeviceSnArray
# deviceSerial="$1"
# displaySelectedDevice $deviceSerial
# SearchForFile="*.{jpg,mp4}"
#fi
else
deviceSerial="$1"
SearchForFile="${2}"
fi
if [ $( isAdbDevice $deviceSerial ) == "true" ]; then
if [ $( isAtHomeDevice $deviceSerial ) == "true" ]; then
echo -e " ${txtRed}There is no camera folder in @Home device${txtRst}\n"
else
searchNpullDeviceFilesFrmFldr $deviceSerial "${deviceCameraFolder}" "${SearchForFile}"
fi
else
echo -e -n " Device is not in 'adb' mode\n"
fi