[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] fix broken import-gnulib.sh
From: |
James Youngman |
Subject: |
Re: [PATCH] fix broken import-gnulib.sh |
Date: |
Thu, 29 Mar 2007 00:01:55 +0100 |
On 3/28/07, address@hidden <address@hidden> wrote:
It doesn't work because 'cvsdir' never gets set to something else than
"/doesnotexist". Attached patch fixes the problem by making it a global
in do_checkout() and moving the assignment behind the calling of that
function.
Thanks for the contribution! Unfortunately, I noticed it this
morning, so I checked in the following change:-
$ cvs -z3 diff -u -r1.31 -r1.32 import-gnulib.sh
Index: import-gnulib.sh
===================================================================
RCS file: /cvsroot/findutils/findutils/import-gnulib.sh,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -r1.31 -r1.32
--- import-gnulib.sh 24 Mar 2007 15:15:58 -0000 1.31
+++ import-gnulib.sh 28 Mar 2007 09:56:04 -0000 1.32
@@ -32,7 +32,7 @@
unset CDPATH
## Defaults
-cvsdir=/doesnotexist
+# cvsdir=/doesnotexist
configfile="./import-gnulib.config"
need_checkout=yes
@@ -109,7 +109,7 @@
}
run_gnulib_tool() {
- local tool="${gnulibdir}"/gnulib-tool
+ local tool="$1"
if test -f "$tool"
then
true
@@ -147,6 +147,7 @@
hack_gnulib_tool_output() {
+ local gnulibdir="${1}"
for file in $extra_files; do
case $file in
*/mdate-sh | */texinfo.tex) dest=doc;;
@@ -184,6 +185,7 @@
main() {
## Option parsing
+ local gnulibdir=/doesnotexist
while getopts "d:" opt
do
case "$opt" in
@@ -198,14 +200,17 @@
## If -d was not given, do CVS checkout/update
if [ $need_checkout = yes ] ; then
- gnulibdir="$cvsdir"/gnulib
do_checkout gnulib-cvs
+ gnulibdir=gnulib-cvs/gnulib
else
echo "Warning: using gnulib code which already exists in
$gnulibdir" >&2
fi
## Invoke gnulib-tool to import the code.
- run_gnulib_tool && hack_gnulib_tool_output &&
+ local tool="${gnulibdir}"/gnulib-tool
+
+ run_gnulib_tool "${tool}" &&
+ hack_gnulib_tool_output "${gnulibdir}" &&
refresh_output_files && echo Done.
}