[Debian-live-changes] r1964 - dists/trunk/live-webhelper/scripts
rjent-guest at alioth.debian.org
rjent-guest at alioth.debian.org
Mon Jun 4 14:11:47 UTC 2007
Author: rjent-guest
Date: 2007-06-04 14:11:47 +0000 (Mon, 04 Jun 2007)
New Revision: 1964
Modified:
dists/trunk/live-webhelper/scripts/cgi
Log:
cgi sed cleanu.
Modified: dists/trunk/live-webhelper/scripts/cgi
===================================================================
--- dists/trunk/live-webhelper/scripts/cgi 2007-06-04 03:57:08 UTC (rev 1963)
+++ dists/trunk/live-webhelper/scripts/cgi 2007-06-04 14:11:47 UTC (rev 1964)
@@ -60,7 +60,7 @@
# Converting '~': sed 's/%7E/\~/g'
# Translate parameters
- QUERY_STRING=$(echo ${QUERY_STRING} | sed -e 's/%2F/\//g' -e 's/+/ /g' -e 's/%3B/\;/g' -e 's/%7E/\~/g' -e 's/%3A/:/g' -e 's/%40/@/g')
+ QUERY_STRING=$(echo ${QUERY_STRING} | sed -e 's/%2F/\//g' -e 's/+/ /g' -e 's/%3B/;/g' -e 's/%7E/~/g' -e 's/%3A/:/g' -e 's/%40/@/g')
# Debug the filtering string
# echo ${QUERY_STRING}
@@ -76,10 +76,10 @@
# Advanced bootstrap options
ARCHITECTURE=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])architecture=[0-9,a-z]+' | cut -f 2 -d '=' | head -n1)
BOOTSTRAP_FLAVOUR=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])bootstrap_flavour=[a-z]+' | cut -f 2 -d '=' | head -n1)
- #MIRROR_BOOTSTRAP
- #MIRROR_BOOTSTRAP_SECURITY
- #MIRROR_BINARY
- #MIRROR_BINARY_SECURITY
+ MIRROR_BOOTSTRAP=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])mirror_bootstrap=[0-9,a-z,A-Z,.,~,:,/,_,-]+' | cut -f 2 -d '=' | head -n1)
+ MIRROR_BOOTSTRAP_SECURITY=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])mirror_bootstrap=[0-9,a-z,A-Z,.,~,:,/,_,-]+' | cut -f 2 -d '=' | head -n1)
+ MIRROR_BINARY=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])mirror_binary=[0-9,a-z,A-Z,.,~,:,/,_,-]+' | cut -f 2 -d '=' | head -n1)
+ MIRROR_BINARY_SECURITY=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])mirror_binary_security=[0-9,a-z,A-Z,.,~,:,/,_,-]+' | cut -f 2 -d '=' | head -n1)
SECTIONS=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])sections=[a-z]+' | cut -f 2 -d '=' | head -n1)
# Advanced chroot options
@@ -96,10 +96,10 @@
DEBIAN_INSTALLER=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])debian_installer=[a-z]+' | cut -f 2 -d '=' | head -n1)
ENCRYPTION=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])encryption=[0-9,a-z,A-Z]+' | cut -f 2 -d '=' | head -n1)
HOSTNAME=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])hostname=[0-9,a-z,A-Z,.,-]+' | cut -f 2 -d '=' | head -n1)
- ISO_APPLICATION=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_application=[0-9,a-z,A-Z,., ,~,;,/,_,-]+' | cut -f 2 -d '=' | head -n1)
- ISO_PREPARER=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_preparer=[0-9,a-z,A-Z,., ,~,;,/,_,-]+' | cut -f 2 -d '=' | head -n1)
- ISO_PUBLISHER=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_publisher=[0-9,a-z,A-Z,., ,~,;,/,_,/,-]+' | cut -f 2 -d '=' | head -n1)
- ISO_VOLUME=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_volume=[0-9,a-z,A-Z,., ,~,;,/,_,-]+' | cut -f 2 -d '=' | head -n1)
+ ISO_APPLICATION=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_application=[0-9,a-z,A-Z,., ,~,;,:,/,_,-]+' | cut -f 2 -d '=' | head -n1)
+ ISO_PREPARER=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_preparer=[0-9,a-z,A-Z,., ,~,;,:,/,_,-]+' | cut -f 2 -d '=' | head -n1)
+ ISO_PUBLISHER=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_publisher=[0-9,a-z,A-Z,., ,~,;,:,/,_,/,-]+' | cut -f 2 -d '=' | head -n1)
+ ISO_VOLUME=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])iso_volume=[0-9,a-z,A-Z,., ,~,;,:,/,_,-]+' | cut -f 2 -d '=' | head -n1)
MEMTEST=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])memtest=[0-9,a-z,A-Z,.,_,-]+' | cut -f 2 -d '=' | head -n1)
NET_PATH=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])net_path=[0-9,a-z,A-Z,.,_,/,-]+' | cut -f 2 -d '=' | head -n1)
NET_SERVER=$(echo ${QUERY_STRING} | grep -oE '(^|[?&])net_server=[0-9,a-z,A-Z,.,_,-]+' | cut -f 2 -d '=' | head -n1)
@@ -130,7 +130,9 @@
# Getting build identifier
BUILD=$(date +%Y%m%d.%H%M%S.%N)
+ echo ${QUERY_STRING}
# Sending html confirmation
+ # Note: On each string remember to use a delimeter that is not in the string.
sed -e "s/BUILD/${BUILD}/g" \
-e "s/EMAIL/${EMAIL}/" \
-e "s/BINARY_IMAGES/${BINARY_IMAGES}/" \
@@ -155,10 +157,10 @@
-e "s/DEBIAN_INSTALLER/${DEBIAN_INSTALLER}/" \
-e "s/ENCRYPTION/${ENCRYPTION}/" \
-e "s/HOSTNAME/${HOSTNAME}/" \
- -e "s/ISO_APPLICATION/${ISO_APPLICATION}/" \
- -e "s/ISO_PREPARER/${ISO_PREPARER}/" \
- -e "s/ISO_PUBLISHER/${ISO_PUBLISHER}/" \
- -e "s/ISO_VOLUME/${ISO_VOLUME}/" \
+ -e "s#ISO_APPLICATION#${ISO_APPLICATION}#" \
+ -e "s#ISO_PREPARER#${ISO_PREPARER}#" \
+ -e "s#ISO_PUBLISHER#${ISO_PUBLISHER}#" \
+ -e "s#ISO_VOLUME#${ISO_VOLUME}#" \
-e "s/MEMTEST/${MEMTEST}/" \
-e "s#NET_PATH#${NET_PATH}#" \
-e "s/NET_SERVER/${NET_SERVER}/" \
More information about the Debian-live-changes
mailing list