From: Pekka Riikonen Date: Sat, 30 Apr 2005 15:50:03 +0000 (+0000) Subject: Fixed 'include' to root of the distdir for existing directory. X-Git-Tag: autodist.1.3~13 X-Git-Url: http://git.silcnet.org/gitweb/?p=autodist.git;a=commitdiff_plain;h=38fa23dd69a23d3e1b3367f027c002f29851c949 Fixed 'include' to root of the distdir for existing directory. --- diff --git a/apps/autodist/CHANGES b/apps/autodist/CHANGES index c5974f8..fcb3687 100644 --- a/apps/autodist/CHANGES +++ b/apps/autodist/CHANGES @@ -10,6 +10,9 @@ Sat Apr 30 11:49:01 EEST 2005 Pekka Riikonen * Fixed .ad processing when the file was not processed, to copy the original to new name. + * Fixed 'include' when copying directories to root of the + distdir, and the destination directory already exist. + Fri Apr 29 16:48:16 EEST 2005 Pekka Riikonen * Fixed configure.ac creation when no fragments in use. diff --git a/apps/autodist/autodist.in b/apps/autodist/autodist.in index fa7a714..12c9cab 100755 --- a/apps/autodist/autodist.in +++ b/apps/autodist/autodist.in @@ -621,17 +621,22 @@ ad_dist_includes() if test "$src" = "$dst"; then # Add to same location - d=`echo $src | sed 's,/[^/]*$,,'` - ds=`echo $src | sed 's/\/$//'` - if test "$ds" = "$d"; then + d=`echo $src | sed 's,/[^/]*$,,'` + ds=`echo $src | sed 's/\/$//'` + if test "$ds" = "$d"; then d=`echo $d | sed 's,/[^/]*$,,'` - fi - if test '!' -d $am_distdir/$d && test "$ds" != "$d"; then + fi + if test "$ds" = "$d"; then + d="" + fi + if test '!' -d $am_distdir/$d && test "$ds" != "$d"; then mkdir -p $am_distdir/$d || exit 1 - fi + fi +echo $d +echo $ds - ad_log " $src into $am_distdir/$d" - cp -pR $src $am_distdir/$d || exit 1 + ad_log " $src into $am_distdir/$d" + cp -pR $src $am_distdir/$d || exit 1 else # Add to different location check=`echo "$dst" | sed 's/?//; s/*//; s/\[//; s/\]//'` @@ -954,7 +959,10 @@ ad_makedist() # Include specific license file if specified if test "$license" != ""; then - ad_log "License file in distribution is $am_distdir/COPYING" + ad_log "" + ad_log "License file in distribution:" + ad_log "-----------------------------" + ad_log " $license into $am_distdir/COPYING" cp -p $license $am_distdir/COPYING || exit 1 fi