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

Side by Side Diff: third_party/lcov-1.9/bin/install.sh

Issue 23189008: Upgrades lcov to 1.10, removes lcov-1.9 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Re-adds UNKNOWN suppression Created 7 years, 4 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 | « third_party/lcov-1.9/bin/genpng ('k') | third_party/lcov-1.9/bin/lcov » ('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 # install.sh [--uninstall] sourcefile targetfile [install options]
4 #
5
6
7 # Check for uninstall option
8 if test "x$1" == "x--uninstall" ; then
9 UNINSTALL=true
10 SOURCE=$2
11 TARGET=$3
12 shift 3
13 else
14 UNINSTALL=false
15 SOURCE=$1
16 TARGET=$2
17 shift 2
18 fi
19
20 # Check usage
21 if test -z "$SOURCE" || test -z "$TARGET" ; then
22 echo Usage: install.sh [--uninstall] source target [install options] >&2
23 exit 1
24 fi
25
26
27 #
28 # do_install(SOURCE_FILE, TARGET_FILE)
29 #
30
31 do_install()
32 {
33 local SOURCE=$1
34 local TARGET=$2
35 local PARAMS=$3
36
37 install -p -D $PARAMS $SOURCE $TARGET
38 }
39
40
41 #
42 # do_uninstall(SOURCE_FILE, TARGET_FILE)
43 #
44
45 do_uninstall()
46 {
47 local SOURCE=$1
48 local TARGET=$2
49
50 # Does target exist?
51 if test -r $TARGET ; then
52 # Is target of the same version as this package?
53 if diff $SOURCE $TARGET >/dev/null; then
54 rm -f $TARGET
55 else
56 echo WARNING: Skipping uninstall for $TARGET - versions differ! >&2
57 fi
58 else
59 echo WARNING: Skipping uninstall for $TARGET - not installed! >&2
60 fi
61 }
62
63
64 # Call sub routine
65 if $UNINSTALL ; then
66 do_uninstall $SOURCE $TARGET
67 else
68 do_install $SOURCE $TARGET "$*"
69 fi
70
71 exit 0
OLDNEW
« no previous file with comments | « third_party/lcov-1.9/bin/genpng ('k') | third_party/lcov-1.9/bin/lcov » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698