summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrandon Low <lostlogic@gentoo.org>2002-07-15 14:37:32 +0000
committerBrandon Low <lostlogic@gentoo.org>2002-07-15 14:37:32 +0000
commitc5d741937697f6f836ceea4045b83776fcf578d0 (patch)
tree2846a7ceba8b6736be86b636ed3bc10d10eea774 /app-admin
parentMasked boson :-( please test. (diff)
downloadgentoo-2-c5d741937697f6f836ceea4045b83776fcf578d0.tar.gz
gentoo-2-c5d741937697f6f836ceea4045b83776fcf578d0.tar.bz2
gentoo-2-c5d741937697f6f836ceea4045b83776fcf578d0.zip
typos stink
Diffstat (limited to 'app-admin')
-rw-r--r--app-admin/gentoolkit/files/etc-update/etc-update22
1 files changed, 12 insertions, 10 deletions
diff --git a/app-admin/gentoolkit/files/etc-update/etc-update b/app-admin/gentoolkit/files/etc-update/etc-update
index da6791531431..e1d2f54a4c3f 100644
--- a/app-admin/gentoolkit/files/etc-update/etc-update
+++ b/app-admin/gentoolkit/files/etc-update/etc-update
@@ -8,7 +8,7 @@
# Leo Lipelis <aeoo@gentoo.org>
# Karl Trygve Kalleberg <karltk@gentoo.org>
#
-# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoolkit/files/etc-update/etc-update,v 1.11 2002/07/15 03:23:58 lostlogic Exp $
+# $Header: /var/cvsroot/gentoo-x86/app-admin/gentoolkit/files/etc-update/etc-update,v 1.12 2002/07/15 14:37:32 lostlogic Exp $
function get_config() {
item=$1
@@ -17,7 +17,7 @@ function get_config() {
# item. If there's more than one of the same configuration item,
# then allow the last setting to take precedence.
cut -d'#' -f1-1 /etc/etc-update.conf | \
- sed -ne "s/^\ *$item\ *=\ *\"\(.*\)\"/\1/p" |sed -e "$p;d"
+ sed -ne "s/^\ *$item\ *=\ *\"\(.*\)\"/\1/p" |sed -e '$p;d'
}
function scan() {
@@ -112,12 +112,13 @@ configuration file is followed by a list of possible replacement files."
function do_file() {
echo
local -i my_input
- local -i fcount
+ local -i fcount=0
until (( `cat ${TMP}/files/${input}|wc -l` < 2 )); do
my_input=0
- (( `cat ${TMP}/files/${input}|wc -l` == 2 )) && my_input=1
- until (( ${my_input} > 0 )) && \
- (( ${my_input} < `cat ${TMP}/files/${input}|wc -l` )); do
+ if (( `cat ${TMP}/files/${input}|wc -l` == 2 )); then
+ my_input=1
+ fi
+ until (( ${my_input} > 0 )) && (( ${my_input} < `cat ${TMP}/files/${input}|wc -l` )); do
fcount=0
for line in `cat ${TMP}/files/${input}`; do
if (( ${fcount} > 0 )); then
@@ -178,10 +179,11 @@ function do_cfg() {
local -i my_input=0
until (( ${my_input} == -1 )); do
- ( echo "Showing differences between ${file} and ${ofile}"
+ ( echo "Showing differences between ${ofile} and ${file}"
`echo "${diff_command}" |
sed -e "s:%file1:${ofile}:" \
- -e "s:%file2:${file}:"` ) | ${pager}
+ -e "s:%file2:${file}:"` )
+ # | ${pager}
echo -n "1) Replace original with update
2) Delete update, keeping original as is
3) Interactively merge original with update
@@ -242,7 +244,7 @@ Please select from the menu above (-1 to exit, losing this merge): "
rm ${rm_opts} ${file}
return 255
;;
- 2) ( echo "Showing differences between ${mfile} and ${ofile}"
+ 2) ( echo "Showing differences between ${ofile} and ${mfile}"
`echo "${diff_command}" | \
sed -e "s:%file1:${ofile}:" \
-e "s:%file2:${mfile}:"` ) | ${pager}
@@ -304,7 +306,7 @@ else
rm_opts=""
mv_opts=""
cp_opts=""
- pager=""
+ pager=""P
fi
declare -i count=0