Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2014-05-22 13:28:56 +0400
committerJunio C Hamano <gitster@pobox.com>2014-05-23 23:41:50 +0400
commitc7db2d16474874b21aad9141e6856f836f719643 (patch)
treef24028c4fd5cdbd30b4471c12cad1faf6edceac3 /t/lib-httpd.sh
parente2a0ccc01fab1770bd3b2767481137c6f728e5ab (diff)
t/lib-httpd: use write_script to copy CGI scripts
Using write_script will set our shebang line appropriately with $SHELL_PATH. The script that is there now is quite simple and likely to succeed even with a non-POSIX /bin/sh, but it does not hurt to be defensive. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/lib-httpd.sh')
-rw-r--r--t/lib-httpd.sh6
1 files changed, 5 insertions, 1 deletions
diff --git a/t/lib-httpd.sh b/t/lib-httpd.sh
index 252cbf163b..8e680efbf0 100644
--- a/t/lib-httpd.sh
+++ b/t/lib-httpd.sh
@@ -105,10 +105,14 @@ else
"Could not identify web server at '$LIB_HTTPD_PATH'"
fi
+install_script () {
+ write_script "$HTTPD_ROOT_PATH/$1" <"$TEST_PATH/$1"
+}
+
prepare_httpd() {
mkdir -p "$HTTPD_DOCUMENT_ROOT_PATH"
cp "$TEST_PATH"/passwd "$HTTPD_ROOT_PATH"
- cp "$TEST_PATH"/broken-smart-http.sh "$HTTPD_ROOT_PATH"
+ install_script broken-smart-http.sh
ln -s "$LIB_HTTPD_MODULE_PATH" "$HTTPD_ROOT_PATH/modules"