esac
}
+# htmlspecialchars: escape <, > and &
+hsc() {
+ local input=$1
+ echo -E "$input" | sed -e 's,&,\&,g;s,<,\<,g;s,>,\>,g'
+}
+
# simple df_fetcher, based on packages/fetchsrc_request
# TODO: tcp (smtp) mode
# TODO: adjust for ~/.requestrc config
dist=$1
}
-while [ $# -gt 0 ] ; do
+while [ $# -gt 0 ]; do
case "$1" in
-d | --dist | --distro)
set_dist $2
echo -E >&2 "* Command: $command"
echo " <batch id='$bid' depends-on=''>"
echo " <command flags='$command_flags'>"
- echo -E "$command" | sed -e 's,&,\&,g;s,<,\<,g;s,>,\>,g'
+ hsc "$command"
echo "</command>"
echo " <info></info>"
echo "$builders_xml"
echo -E >&2 "* Post-Command: $post_command"
echo " <batch id='$bid' depends-on='$depend'>"
echo " <command flags='$command_flags'>"
- echo -E "$post_command" | sed -e 's,&,\&,g;s,<,\<,g;s,>,\>,g'
+ hsc "$post_command"
echo "</command>"
echo " <info></info>"
echo "$builders_xml"