]> Dogcows Code - chaz/tar/blobdiff - bootstrap
Add fseeko and snprintf.
[chaz/tar] / bootstrap
index 6d9ac6728374051a43874b33c5b71b9087cd8270..a318f68f2c7bd73219faea1a6980f46e40d4a641 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
@@ -51,7 +51,7 @@ Options:
  --skip-po                Do not download po files.
  --update-po[=LANG]       Update po file(s) and exit.
  --cvs-user=USERNAME      Set the CVS username to be used when accessing
-                          the gnulib repository.
+                          the paxutils repository.
 
 If the file bootstrap.conf exists in the current working directory, its
 contents are read as shell variables to configure the bootstrap.
@@ -69,24 +69,34 @@ checkout() {
   if [ ! -d $1 ]; then
     echo "$0: getting $1 files..."
 
-    case ${CVS_AUTH-pserver} in
-    pserver)
-      CVS_PREFIX=':pserver:anonymous@';;
-    ssh)
-      CVS_PREFIX="$CVS_USER${CVS_USER+@}";;
-    *)
-      echo "$0: $CVS_AUTH: Unknown CVS access method" >&2
-      exit 1;;
-    esac
+    case $1 in
+    paxutils)
+      case ${CVS_AUTH-pserver} in
+      pserver)
+        CVS_PREFIX=':pserver:anonymous@';;
+      ssh)
+        CVS_PREFIX="$CVS_USER${CVS_USER+@}";;
+      *)
+        echo "$0: $CVS_AUTH: Unknown CVS access method" >&2
+        exit 1;;
+      esac
+
+      case $CVS_RSH in
+      '') CVS_RSH=ssh; export CVS_RSH;;
+      esac
 
-    case $CVS_RSH in
-    '') CVS_RSH=ssh; export CVS_RSH;;
+      CVSURL=${CVS_PREFIX}cvs.savannah.gnu.org:/cvsroot/"$1"
+      ;;
+      
+    gnulib)
+      CVSURL=:pserver:anonymous@pserver.git.sv.gnu.org:/gnulib.git
+      ;;
+      
     esac
 
     trap "cleanup $1" 1 2 13 15
 
-    cvs -z3 -q -d ${CVS_PREFIX}cvs.savannah.gnu.org:/cvsroot/"$1" co $1 ||
-      cleanup $1
+    cvs -z3 -q -d $CVSURL co $1 || cleanup $1
 
     trap - 1 2 13 15
   fi
@@ -339,28 +349,6 @@ copy_files() {
   done
 }
 
-copy_files ${PAXUTILS_SRCDIR}/m4 m4
-echo "$0: Creating m4/paxutils.m4"
-(echo "# This file is generated automatically. Please, do not edit."
- echo "#"
- echo "AC_DEFUN([${package}_PAXUTILS],["
- cat ${PAXUTILS_SRCDIR}/m4/DISTFILES | sed '/^#/d;s/\(.*\)\.m4/pu_\1/' | tr a-z A-Z
- echo "])") > ./m4/paxutils.m4
-ignorefile m4 paxutils.m4
-
-if [ -d rmt ]; then
-   :
-else
-   mkdir rmt
-fi
-
-for dir in doc rmt lib tests
-do
-       copy_files ${PAXUTILS_SRCDIR}/$dir $dir
-done
-
-copy_files ${PAXUTILS_SRCDIR}/paxlib lib pax
-
 # Get gnulib files.
 
 case ${GNULIB_SRCDIR--} in
@@ -372,6 +360,12 @@ esac
 gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
 <$gnulib_tool || exit
 
+ensure_dir_exists()
+{
+  d=`dirname $dst`
+  test -d "$d" || mkdir -p -- "$d"
+}
+
 symlink_to_gnulib()
 {
   src=$GNULIB_SRCDIR/$1
@@ -388,6 +382,7 @@ symlink_to_gnulib()
       test -f "$dst" &&
       cmp -s "$src" "$dst" || {
        echo "$0: cp -fp $src $dst" &&
+       ensure_dir_exists $dst &&
        cp -fp "$src" "$dst"
       }
     else
@@ -410,6 +405,7 @@ symlink_to_gnulib()
        esac
 
        echo "$0: ln -fs $dot_dots$src $dst" &&
+       ensure_dir_exists $dst &&
        ln -fs "$dot_dots$src" "$dst"
       }
     fi
@@ -592,6 +588,28 @@ slurp $bt2 $bt || exit
 
 rm -fr $bt $bt2 || exit
 
+# Import from paxutils
+copy_files ${PAXUTILS_SRCDIR}/m4 m4
+echo "$0: Creating m4/paxutils.m4"
+(echo "# This file is generated automatically. Please, do not edit."
+ echo "#"
+ echo "AC_DEFUN([${package}_PAXUTILS],["
+ cat ${PAXUTILS_SRCDIR}/m4/DISTFILES | sed '/^#/d;s/\(.*\)\.m4/pu_\1/' | tr a-z A-Z
+ echo "])") > ./m4/paxutils.m4
+ignorefile m4 paxutils.m4
+
+if [ -d rmt ]; then
+   :
+else
+   mkdir rmt
+fi
+
+for dir in doc rmt lib tests
+do
+       copy_files ${PAXUTILS_SRCDIR}/$dir $dir
+done
+
+copy_files ${PAXUTILS_SRCDIR}/paxlib lib pax
 
 # Reconfigure, getting other files.
 
This page took 0.022619 seconds and 4 git commands to generate.