X-Git-Url: http://git.silcnet.org/gitweb/?p=runtime.git;a=blobdiff_plain;f=apps%2Fautodist%2Fautodist.in;h=3154d5ffaceb7afe0fbbb83c097bed4caa240fdf;hp=16a789ac514ac78ad956958a9860192d7134c420;hb=193db015b0c8cddb4ca3f1601d5c67f16bde6bbc;hpb=c83c0ac17babbc8b3f4bb82dab2cfeb03065d867 diff --git a/apps/autodist/autodist.in b/apps/autodist/autodist.in index 16a789ac..3154d5ff 100755 --- a/apps/autodist/autodist.in +++ b/apps/autodist/autodist.in @@ -565,16 +565,22 @@ ad_process_ads() for i in $files do fname=`echo $i | sed s/\.ad//` + orig=$i ad_debug "Processing $i to be $fname" ad_log " $i into $fname" # Run the distribution processing for this file - ad_process_file $i $fname false - if test -f $fname; then - cp -p $i $fname || exit 1 + ad_process_file $i $fname.tmp false + + # Remove any trailing backslashes + if test -f "$fname.tmp"; then + sed -e :a -e '/\\$/N; s/[ ]*\\\n//; ta' < $fname.tmp > $fname + else + cp -p $orig $fname || exit 1 fi + rm -f $fname.tmp done ad_log ""