1#!/bin/sh 2# Copyright (C) 2012 The Android Open Source Project 3# 4# Licensed under the Apache License, Version 2.0 (the "License"); 5# you may not use this file except in compliance with the License. 6# You may obtain a copy of the License at 7# 8# http://www.apache.org/licenses/LICENSE-2.0 9# 10# Unless required by applicable law or agreed to in writing, software 11# distributed under the License is distributed on an "AS IS" BASIS, 12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13# See the License for the specific language governing permissions and 14# limitations under the License. 15# 16adb_options=" " 17max_resolution=3 18if [ $# -eq 0 ]; then 19 echo "assuming default resolution" 20elif [ "$1" = "-s" ]; then 21 adb_options=""$1" "$2"" 22elif [ "$1" = "720x480" ]; then 23 max_resolution=1 24elif [ "$1" = "1280x720" ]; then 25 max_resolution=2 26elif [ "$1" = "1920x1080" ]; then 27 max_resolution=3 28elif [ "$1" = "all" ]; then 29 max_resolution=3 30else 31 echo "Usage: copy_media.sh [720x480|1280x720|1920x1080] [-s serial]" 32 echo " for testing up to 1280x720, copy_media.sh 1280x720" 33 echo " default resolution, when no argument is specified, is 1920x1080" 34 echo " copy_media.sh all will copy all the files." 35 exit 36fi 37 38if [ $# -gt 2 ]; then 39 echo "adb option exists" 40 adb_options=""$2" "$3"" 41fi 42 43echo "max resolution is $1" 44echo "adb options "$adb_options"" 45 46if [ $max_resolution -ge 3 ]; then 47 echo "copying 1920x1080" 48 adb $adb_options push bbb_short/1920x1080 /sdcard/test/bbb_short/1920x1080 49 adb $adb_options push bbb_full/1920x1080 /sdcard/test/bbb_full/1920x1080 50fi 51 52if [ $max_resolution -ge 2 ]; then 53 echo "copying 1280x720" 54 adb $adb_options push bbb_short/1280x720 /sdcard/test/bbb_short/1280x720 55 adb $adb_options push bbb_full/1280x720 /sdcard/test/bbb_full/1280x720 56fi 57 58if [ $max_resolution -ge 1 ]; then 59 echo "copying 720x480" 60 adb $adb_options push bbb_short/720x480 /sdcard/test/bbb_short/720x480 61 adb $adb_options push bbb_full/720x480 /sdcard/test/bbb_full/720x480 62fi 63 64echo "copying all others" 65adb $adb_options push bbb_short/176x144 /sdcard/test/bbb_short/176x144 66adb $adb_options push bbb_full/176x144 /sdcard/test/bbb_full/176x144 67adb $adb_options push bbb_short/480x360 /sdcard/test/bbb_short/480x360 68adb $adb_options push bbb_full/480x360 /sdcard/test/bbb_full/480x360 69