Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(149)

Side by Side Diff: third_party/ffmpeg/copy_binaries.sh

Issue 149554: Rewrite ffmpeg_binaries target to use GYP built-ins and branding conditions. (Closed)
Patch Set: remove unused helper script Created 11 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | third_party/ffmpeg/ffmpeg.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 #!/bin/bash
2 #
3 # This is meant to replicate the behavior of cp, except that it will not fail
4 # if the source files are not present. Something like
5 # "cp ${SOURCES} ${DEST} || true" would also have worked except that
6 # gyp does not allow for specifying || in the action, and the windows
7 # cygwin envrionment does not include "true" making a script like this the
8 # least ugly solution.
9
10 SOURCES=""
11 DESTINATION=""
12
13 # Shift off every argument but the last and consider them the sources.
14 # It would have probably been easier to put the destination first, but
15 # this is not too hard and it replicates the argument ordering of cp.
16 while (( "$#" != 1 )); do
17 SOURCES="$SOURCES $1"
18 shift
19 done
20
21 DESTINATION=$1
22
23 # Early out if there was not enough parameters to discern a destination.
24 # Also fail the command because this means we are being invoked incorrectly.
25 if test -z "$DESTINATION"; then
26 echo "ERROR: Destination empty."
27 exit 1
28 fi
29
30 # Only try to copy the source file if it exists. It is not an error
31 # if the input does not exist; we just silently ignore the input.
32 for i in $SOURCES; do
33 if test -f $i; then
34 cp -v -f $i $DESTINATION
35 fi
36 done
37
38 # Make sure we always succeed.
39 exit 0
OLDNEW
« no previous file with comments | « no previous file | third_party/ffmpeg/ffmpeg.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698