install -d ${web_path}/$i
done
-for i in $(find web -name '.htaccess' -o -name '*.php' -o -name '*.phh' -o -name '*.pho' -o -name '*.css' -o -name '*.js' -o -name '*.mp3' -o -name '*.swf' -o -name 'terms-of-service*' | sed 's/^....//g'); do
+for i in $(find web -name '.htaccess' -o -name '*.php' -o -name '*.phh' -o -name '*.pho' -o -name '*.html' -o -name '*.css' -o -name '*.js' -o -name '*.mp3' -o -name '*.swf' -o -name 'terms-of-service*' | sed 's/^....//g'); do
install -m 644 "web/$i" "${web_path}/$i"
done
if [ "$test_add" = "TRUE" ]; then
- for i in $(find webtest -name '.htaccess' -o -name '*.phh' -o -name '*.pho' -o -name '*.css' -o -name '*.js' -o -name '*.mp3' -o -name '*.swf' -o -name 'terms-of-service*' | sed 's/^........//g'); do
- install -m 644 "webtest/$i" "${web_path}/$i"
+ for i in $(find webtest -type d | grep '/' | sed 's/^........//g'); do
+ install -d ${web_path}/test/$i
+ done
+
+ for i in $(find webtest -name '.htaccess' -o -name '*.phh' -o -name '*.pho' -o -name '*.html' -o -name '*.css' -o -name '*.js' -o -name '*.mp3' -o -name '*.swf' -o -name 'terms-of-service*' | sed 's/^........//g'); do
+ install -m 644 "webtest/$i" "${web_path}/test/$i"
done
for i in $(find webtest -name '*.php' | sed 's/^........//g'); do
- install -m 755 "webtest/$i" "${web_path}/$i"
+ install -m 755 "webtest/$i" "${web_path}/test/$i"
done
fi
$this->cds = $cds;
}
- static function pre_create($cds, $url)
+ static function pre_create($cds, $url, $opts=NULL)
{
if ($cds->dbg_get() > 2) { printf("CURL: curl_init\n"); }
if (($ch = curl_init()) == FALSE)
return FALSE;
curl_setopt($ch, CURLOPT_URL, $url);
- curl_setopt($ch, CURLOPT_HEADER, 0);
- curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
- curl_setopt($ch, CURLOPT_FORBID_REUSE, true);
- curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: close'));
+ if ($opts == NULL) {
+ curl_setopt($ch, CURLOPT_HEADER, 0);
+ curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
+ curl_setopt($ch, CURLOPT_FORBID_REUSE, true);
+ curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: close'));
+ }
+ else {
+ foreach($opts as $opt => $value) {
+ curl_setopt($ch, $opt, $value);
+ }
+ }
return ($ch);
}
define('WEB_URL', 'http://localhost/curl-de-sac');
define('DBG_LEVEL', 0);
-require_once('Obj/curl-de-sac.phh');
+require_once('../Obj/curl-de-sac.phh');
class short_cmd extends CDS_cmd {
var $short_data;
if ($i == 2) {
printf("MAIN: load 'short'\n");
- if ($cds->execute("short", WEB_URL.'/short.php') == FALSE) {
+ if ($cds->execute("short", WEB_URL.'/test/short.php') == FALSE) {
printf("MAIN: push 'short' command failed\n");
exit(123);
}
if ($i == 3) {
printf("MAIN: load 'short'\n");
- if ($cds->execute("short", WEB_URL.'/short.php') == FALSE) {
+ if ($cds->execute("short", WEB_URL.'/test/short.php') == FALSE) {
printf("MAIN: push 'short' command failed\n");
exit(123);
}
if ($i == 4) {
printf("MAIN: load 'long'\n");
- if ($cds->execute("long", WEB_URL.'/long.php') == FALSE) {
+ if ($cds->execute("long", WEB_URL.'/test/long.php') == FALSE) {
printf("MAIN: push 'long' command failed\n");
exit(123);
}