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

Side by Side Diff: app-admin/eselect-vi/files/eselect-vi-1.1.7-prefix.patch

Issue 6879117: Update the eselect-vi package to the latest version. (Closed) Base URL: ssh://gitrw.chromium.org:9222/portage-stable.git@master
Patch Set: Created 9 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « app-admin/eselect-vi/eselect-vi-1.1.7-r1.ebuild ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 --- vi.eselect-1.1.7.orig 2010-04-24 16:16:14.000000000 +0200
2 +++ vi.eselect-1.1.7 2010-04-24 16:20:02.000000000 +0200
3 @@ -12,13 +12,13 @@
4 find_targets() {
5 local f
6 for f in \
7 - "${ROOT}"/usr/bin/vim \
8 - "${ROOT}"/usr/bin/nvi \
9 - "${ROOT}"/usr/bin/elvis \
10 - "${ROOT}"/usr/bin/vile \
11 - "${ROOT}"/usr/bin/gvim \
12 - "${ROOT}"/usr/bin/xvile \
13 - "${ROOT}"/bin/busybox \
14 + "${EROOT}"/usr/bin/vim \
15 + "${EROOT}"/usr/bin/nvi \
16 + "${EROOT}"/usr/bin/elvis \
17 + "${EROOT}"/usr/bin/vile \
18 + "${EROOT}"/usr/bin/gvim \
19 + "${EROOT}"/usr/bin/xvile \
20 + "${EROOT}"/bin/busybox \
21 ; do
22 if [[ -f "${f}" ]] ; then
23 echo $(basename "${f}" )
24 @@ -28,8 +28,8 @@
25
26 # try to remove the vi, ex, view and man vi symlinks
27 remove_symlinks() {
28 - rm -f "${ROOT}"/usr/bin/{vi,ex,view} &>/dev/null && \
29 - rm -f "${ROOT}"/usr/share/man/man1/{vi,ex,view}.1{,.gz,.bz2,.lzma} &>/de v/null
30 + rm -f "${EROOT}"/usr/bin/{vi,ex,view} &>/dev/null && \
31 + rm -f "${EROOT}"/usr/share/man/man1/{vi,ex,view}.1{,.gz,.bz2,.lzma} &>/d ev/null
32 }
33
34 # set a man page symlink
35 @@ -37,7 +37,7 @@
36 local target="${1}" link_name="${2}" x extension
37
38 for x in ".1" ".1.bz2" ".1.gz" ".1.lzma" ; do
39 - if [[ -e /usr/share/man/man1/${target}${x} ]] ; then
40 + if [[ -e ${EROOT}/usr/share/man/man1/${target}${x} ]] ; then
41 extension="${x}"
42 break
43 fi
44 @@ -49,7 +49,7 @@
45 fi
46
47 ln -s "${target}${extension}" \
48 - "${ROOT}/usr/share/man/man1/${link_name}${extension}"
49 + "${EROOT}/usr/share/man/man1/${link_name}${extension}"
50 }
51
52 # set the vi, ex, view, and man vi symlinks
53 @@ -62,9 +62,9 @@
54
55 local dir
56 if [[ ${target} == "busybox" ]]; then
57 - dir="${ROOT}/bin"
58 + dir="${EROOT}/bin"
59 else
60 - dir="${ROOT}/usr/bin"
61 + dir="${EROOT}/usr/bin"
62 fi
63
64 if [[ -f "${dir}/${target}" ]] ; then
65 @@ -76,12 +76,12 @@
66 set_man_symlink "${target}" "view"
67
68 # it's not okay if these fail
69 - target=$(relative_name "${dir}/${target}" "${ROOT}/usr/bin")
70 - ln -s "${target}" "${ROOT}/usr/bin/vi" \
71 + target=$(relative_name "${dir}/${target}" "${EROOT}/usr/bin")
72 + ln -s "${target}" "${EROOT}/usr/bin/vi" \
73 || die "Couldn't set ${target} /usr/bin/vi symlink"
74 - ln -s "${target}" "${ROOT}/usr/bin/ex" \
75 + ln -s "${target}" "${EROOT}/usr/bin/ex" \
76 || die "Couldn't set ${target} /usr/bin/ex symlink"
77 - ln -s "${target}" "${ROOT}/usr/bin/view" \
78 + ln -s "${target}" "${EROOT}/usr/bin/view" \
79 || die "Couldn't set ${target} /usr/bin/view symlink"
80 else
81 die -q "Target \"${1}\" doesn't appear to be valid!"
82 @@ -98,9 +98,9 @@
83 [[ -z "${@}" ]] || die -q "Too many parameters"
84
85 write_list_start "Current vi implementation:"
86 - if [[ -L "${ROOT}/usr/bin/vi" ]] ; then
87 - write_kv_list_entry "$(basename $(canonicalise ${ROOT}/usr/bin/v i ) )" ""
88 - elif [[ -e "${ROOT}/usr/bin/vi" ]] ; then
89 + if [[ -L "${EROOT}/usr/bin/vi" ]] ; then
90 + write_kv_list_entry "$(basename $(canonicalise ${EROOT}/usr/bin/ vi ) )" ""
91 + elif [[ -e "${EROOT}/usr/bin/vi" ]] ; then
92 write_kv_list_entry "(not a symlink)" ""
93 else
94 write_kv_list_entry "(unset)" ""
95 @@ -120,7 +120,7 @@
96 targets=( $(find_targets ) )
97 for (( i = 0; i < ${#targets[@]}; i++ )); do
98 [[ ${targets[i]} = \
99 - $(basename "$(canonicalise "${ROOT}/usr/bin/vi")") ]] \
100 + $(basename "$(canonicalise "${EROOT}/usr/bin/vi")") ]] \
101 && targets[i]=$(highlight_marker "${targets[i]}")
102 done
103 write_list_start "Available vi implementations:"
104 @@ -148,15 +148,15 @@
105 elif [[ -n "${2}" ]] ; then
106 die -q "Too many parameters"
107
108 - elif [[ -L "${ROOT}/usr/bin/vi" ]] ; then
109 + elif [[ -L "${EROOT}/usr/bin/vi" ]] ; then
110 if ! remove_symlinks ; then
111 die -q "Can't remove existing provider"
112 elif ! set_symlinks "${1}" ; then
113 die -q "Can't set new provider"
114 fi
115
116 - elif [[ -e "${ROOT}/usr/bin/vi" ]] ; then
117 - die -q "Sorry, ${ROOT}/usr/bin/vi confuses me"
118 + elif [[ -e "${EROOT}/usr/bin/vi" ]] ; then
119 + die -q "Sorry, ${EROOT}/usr/bin/vi confuses me"
120
121 else
122 set_symlinks "${1}" || die -q "Can't set a new provider"
123 @@ -177,11 +177,11 @@
124 [[ -z "${1}" ]] || ( [[ -z "${2}" ]] && [[ "${1}" == "--if-unset" ]] ) | | \
125 die -q "Usage error"
126
127 - if [[ -L "${ROOT}/usr/bin/vi" ]] ; then
128 + if [[ -L "${EROOT}/usr/bin/vi" ]] ; then
129 [[ ${1} == "--if-unset" ]] && return
130 remove_symlinks || die -q "Can't remove existing link"
131 fi
132 - if [[ -e "${ROOT}/usr/bin/vi" ]] ; then
133 + if [[ -e "${EROOT}/usr/bin/vi" ]] ; then
134 die -q "Can't set a new provider"
135 elif ! [[ -z $(find_targets ) ]] ; then
136 set_symlinks 1 || die -q "Can't set a new provider"
OLDNEW
« no previous file with comments | « app-admin/eselect-vi/eselect-vi-1.1.7-r1.ebuild ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698