--- usr/bin/distribute.orig 2008-11-24 11:02:18 +0300 +++ usr/bin/distribute 2008-11-24 11:06:34 +0300 @@ -21,6 +21,8 @@ #set -x # Changes: +# , 2008 Nov 24: +# - use subst instead php for html preparing # , 2005 Jan 09: # - Add --recordcd option for record CD disk immediately, without ISO image # - REMOVED: add filename encoding variable @@ -524,6 +526,7 @@ function finishCD() { # Debug: #echo "${other_archs_array[@]}" other_archs="" + # Lav FIXME: missed in template now export other_archs # the parameter for php. if (( ${#other_archs[@]} > 1 )); then other_archs="{$(IFS=','; echo "${other_archs_array[@]}";)}" @@ -533,15 +536,15 @@ function finishCD() { # Debug: #echo "${other_archs}" #set +x - for f in "$DISK_DESCRIPTION_SOURCE"*.php4; do - ext="${f%%.php4}" + for f in "$DISK_DESCRIPTION_SOURCE"*.template; do + ext="${f%%.template}" ext="${ext##"$DISK_DESCRIPTION_SOURCE"}" - title="$(< "$THIS_LAYOUTS_DIR/cd$(( cdN ))"/.disk/info)" \ - PREFIX="$PREFIX" \ - ARCH="$ARCH" \ - php -q -d short_open_tag=Off -d register_globals=On "$f" \ - > "$THIS_LAYOUTS_DIR/cd$(( cdN ))"/index"$ext".html - done + title="$(< "$THIS_LAYOUTS_DIR/cd$(( cdN ))"/.disk/info)" + sed -e < "$f" > "$THIS_LAYOUTS_DIR/cd$(( cdN ))"/index"$ext".html \ + "s|@TITLE@|$title|g + s|@PREFIX@|$PREFIX|g + s|@ARCH@|$ARCH|g" + done for f in "$DISK_DESCRIPTION_SOURCE"*.css; do ext="${f%%.css}" ext="${ext##"$DISK_DESCRIPTION_SOURCE"}"