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

Unified Diff: unpack_lib_posix.sh

Issue 757313004: Remove all remaining obj_int_extract code (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: Created 6 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « unpack_lib_posix.gypi ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: unpack_lib_posix.sh
===================================================================
--- unpack_lib_posix.sh (revision 293274)
+++ unpack_lib_posix.sh (working copy)
@@ -1,77 +0,0 @@
-#!/bin/bash -e
-#
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This script is used to unpack a .a file into object files.
-#
-# Arguments:
-#
-# d - Output directory.
-# a - List of possible locations of the archive.
-# f - List of files to extract.
-#
-
-export LC_ALL=C
-
-# Avoid things like -n messing up the grepping below.
-unset GREP_OPTIONS
-
-while getopts "d:a:f:r:" flag
-do
- if [ "$flag" = "d" ]; then
- out_dir=$OPTARG
- elif [ "$flag" = "a" ]; then
- lib_files="$OPTARG $lib_files"
- elif [ "$flag" = "f" ]; then
- obj_files="$OPTARG $obj_files"
- elif [ "$flag" = "r" ]; then
- ar=$OPTARG
- fi
-done
-
-for f in $lib_files; do
- if [ -a $f ]; then
- lib_file=$f
- break
- fi
-done
-
-if [ -z "$lib_file" ]; then
- echo "Failed to locate a static library."
- false
- exit
-fi
-
-if [ ! -f "$ar" ]; then
- # Find the appropriate ar to use.
- ar="ar"
- if [ -n "$AR_target" ]; then
- ar=$AR_target
- elif [ -n "$AR" ]; then
- ar=$AR
- fi
-fi
-
-obj_list="$($ar t $lib_file | grep '\.o$')"
-
-function extract_object {
- for f in $obj_list; do
- filename="${f##*/}"
-
- if [ -z "$(echo $filename | grep $1)" ]; then
- continue
- fi
-
- # Only echo this if debugging.
- # echo "Extract $filename from archive to $out_dir/$1."
- $ar p $lib_file $filename > $out_dir/$1
- [ -s $out_dir/$1 ] || exit 1
- break
- done
-}
-
-for f in $obj_files; do
- extract_object $f
-done
« no previous file with comments | « unpack_lib_posix.gypi ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698