Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37767322
en ru br
ALT Linux repos
S:0.4.1-alt10
5.0: 0.4.1-alt8
4.1: 0.4.1-alt7
4.0: 0.4.1-alt7
3.0: 0.4.1-alt5

Group :: Development/Other
RPM: distribute

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: distribute-php.patch
Download


--- 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:
+# <lav@altlinux.ru>, 2008 Nov 24:
+# - use subst instead php for html preparing
 # <lav@altlinux.ru>, 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"}"
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin