Use CGI_BASEDIR instead of hardcoding `/cgi' - gophercgis - Collection of gopher CGI/DCGI for geomyidae
(HTM) hg clone https://bitbucket.org/iamleot/gophercgis
(DIR) Log
(DIR) Files
(DIR) Refs
(DIR) README
(DIR) LICENSE
---
(DIR) changeset 682ca5180ba4faf062aa019e188ac47dab86859c
(DIR) parent 58e3b383da25edf55287e8d86fd89eb479819203
(HTM) Author: Leonardo Taccari <iamleot@gmail.com>
Date: Wed, 5 Dec 2018 00:18:16
Use CGI_BASEDIR instead of hardcoding `/cgi'
Diffstat:
acmqueue/feed.dcgi | 2 +-
ansa/feed.dcgi | 2 +-
bandcamp/album.dcgi | 2 +-
bandcamp/music.dcgi | 2 +-
espresso/feed.dcgi | 2 +-
github/commits.dcgi | 10 +++++-----
github/issue.dcgi | 8 ++++----
github/issues.dcgi | 8 ++++----
github/pull.dcgi | 10 +++++-----
github/pulls.dcgi | 10 +++++-----
github/repo.dcgi | 8 ++++----
instagram/comments.cgi | 2 +-
instagram/user.dcgi | 4 ++--
internazionale/sections.dcgi | 4 ++--
lobsters/lobsters.dcgi | 4 ++--
lwn/feed.dcgi | 2 +-
netbsd/req.dcgi | 2 +-
nntp/nntp.dcgi | 4 ++--
raiplay/categoria.dcgi | 2 +-
raiplay/elenco-programmi.dcgi | 2 +-
raiplay/genere.dcgi | 2 +-
raiplay/programma.dcgi | 2 +-
reddit/r.dcgi | 4 ++--
rep/rep.dcgi | 2 +-
technologyreview/feed.dcgi | 2 +-
theatlantic/feed.dcgi | 2 +-
theguardian/feed.dcgi | 2 +-
twitter/tweets.dcgi | 2 +-
youtube/search.dcgi | 2 +-
29 files changed, 55 insertions(+), 55 deletions(-)
---
diff -r 58e3b383da25 -r 682ca5180ba4 acmqueue/feed.dcgi
--- a/acmqueue/feed.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/acmqueue/feed.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -5,7 +5,7 @@
FEED_AUTHOR=yes
FEED_DATE=yes
-ARTICLE_CGI="/cgi/acmqueue/article.cgi"
+ARTICLE_CGI="${CGI_BASEDIR}/acmqueue/article.cgi"
echo ""
echo "ACM Queue"
diff -r 58e3b383da25 -r 682ca5180ba4 ansa/feed.dcgi
--- a/ansa/feed.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/ansa/feed.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -5,7 +5,7 @@
FEED_AUTHOR=yes
FEED_DATE=yes
-ARTICLE_CGI="/cgi/ansa/article.cgi"
+ARTICLE_CGI="${CGI_BASEDIR}/ansa/article.cgi"
echo ""
echo "ANSA"
diff -r 58e3b383da25 -r 682ca5180ba4 bandcamp/album.dcgi
--- a/bandcamp/album.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/bandcamp/album.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,7 +2,7 @@
. ../common/config.sh
-ALBUM_CGI="/cgi/bandcamp/album.dcgi"
+ALBUM_CGI="${CGI_BASEDIR}/bandcamp/album.dcgi"
extract_json()
diff -r 58e3b383da25 -r 682ca5180ba4 bandcamp/music.dcgi
--- a/bandcamp/music.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/bandcamp/music.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,7 +2,7 @@
. ../common/config.sh
-ALBUM_CGI="/cgi/bandcamp/album.dcgi"
+ALBUM_CGI="${CGI_BASEDIR}/bandcamp/album.dcgi"
artist="$2"
url="https://${artist}.bandcamp.com"
diff -r 58e3b383da25 -r 682ca5180ba4 espresso/feed.dcgi
--- a/espresso/feed.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/espresso/feed.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -5,7 +5,7 @@
FEED_AUTHOR=yes
FEED_DATE=yes
-ARTICLE_CGI="/cgi/espresso/article.cgi"
+ARTICLE_CGI="${CGI_BASEDIR}/espresso/article.cgi"
echo ""
echo "l'Espresso"
diff -r 58e3b383da25 -r 682ca5180ba4 github/commits.dcgi
--- a/github/commits.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/github/commits.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,11 +2,11 @@
. ../common/config.sh
-ISSUE_CGI="/cgi/github/issue.dcgi"
-ISSUES_CGI="/cgi/github/issues.dcgi"
-COMMITS_CGI="/cgi/github/commits.dcgi"
-PULLS_CGI="/cgi/github/pulls.dcgi"
-PULL_CGI="/cgi/github/pull.dcgi"
+ISSUE_CGI="${CGI_BASEDIR}/github/issue.dcgi"
+ISSUES_CGI="${CGI_BASEDIR}/github/issues.dcgi"
+COMMITS_CGI="${CGI_BASEDIR}/github/commits.dcgi"
+PULLS_CGI="${CGI_BASEDIR}/github/pulls.dcgi"
+PULL_CGI="${CGI_BASEDIR}/github/pull.dcgi"
case "$2" in
diff -r 58e3b383da25 -r 682ca5180ba4 github/issue.dcgi
--- a/github/issue.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/github/issue.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,10 +2,10 @@
. ../common/config.sh
-ISSUE_CGI="/cgi/github/issue.dcgi"
-ISSUES_CGI="/cgi/github/issues.dcgi"
-COMMITS_CGI="/cgi/github/commits.dcgi"
-PULLS_CGI="/cgi/github/pulls.dcgi"
+ISSUE_CGI="${CGI_BASEDIR}/github/issue.dcgi"
+ISSUES_CGI="${CGI_BASEDIR}/github/issues.dcgi"
+COMMITS_CGI="${CGI_BASEDIR}/github/commits.dcgi"
+PULLS_CGI="${CGI_BASEDIR}/github/pulls.dcgi"
case "$2" in
diff -r 58e3b383da25 -r 682ca5180ba4 github/issues.dcgi
--- a/github/issues.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/github/issues.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,10 +2,10 @@
. ../common/config.sh
-ISSUE_CGI="/cgi/github/issue.dcgi"
-ISSUES_CGI="/cgi/github/issues.dcgi"
-COMMITS_CGI="/cgi/github/commits.dcgi"
-PULLS_CGI="/cgi/github/pulls.dcgi"
+ISSUE_CGI="${CGI_BASEDIR}/github/issue.dcgi"
+ISSUES_CGI="${CGI_BASEDIR}/github/issues.dcgi"
+COMMITS_CGI="${CGI_BASEDIR}/github/commits.dcgi"
+PULLS_CGI="${CGI_BASEDIR}/github/pulls.dcgi"
case "$2" in
diff -r 58e3b383da25 -r 682ca5180ba4 github/pull.dcgi
--- a/github/pull.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/github/pull.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,11 +2,11 @@
. ../common/config.sh
-ISSUE_CGI="/cgi/github/issue.dcgi"
-ISSUES_CGI="/cgi/github/issues.dcgi"
-COMMITS_CGI="/cgi/github/commits.dcgi"
-PULLS_CGI="/cgi/github/pulls.dcgi"
-PULL_CGI="/cgi/github/pull.dcgi"
+ISSUE_CGI="${CGI_BASEDIR}/github/issue.dcgi"
+ISSUES_CGI="${CGI_BASEDIR}/github/issues.dcgi"
+COMMITS_CGI="${CGI_BASEDIR}/github/commits.dcgi"
+PULLS_CGI="${CGI_BASEDIR}/github/pulls.dcgi"
+PULL_CGI="${CGI_BASEDIR}/github/pull.dcgi"
case "$2" in
diff -r 58e3b383da25 -r 682ca5180ba4 github/pulls.dcgi
--- a/github/pulls.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/github/pulls.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,11 +2,11 @@
. ../common/config.sh
-ISSUE_CGI="/cgi/github/issue.dcgi"
-ISSUES_CGI="/cgi/github/issues.dcgi"
-COMMITS_CGI="/cgi/github/commits.dcgi"
-PULLS_CGI="/cgi/github/pulls.dcgi"
-PULL_CGI="/cgi/github/pull.dcgi"
+ISSUE_CGI="${CGI_BASEDIR}/github/issue.dcgi"
+ISSUES_CGI="${CGI_BASEDIR}/github/issues.dcgi"
+COMMITS_CGI="${CGI_BASEDIR}/github/commits.dcgi"
+PULLS_CGI="${CGI_BASEDIR}/github/pulls.dcgi"
+PULL_CGI="${CGI_BASEDIR}/github/pull.dcgi"
case "$2" in
diff -r 58e3b383da25 -r 682ca5180ba4 github/repo.dcgi
--- a/github/repo.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/github/repo.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,10 +2,10 @@
. ../common/config.sh
-ISSUE_CGI="/cgi/github/issue.dcgi"
-ISSUES_CGI="/cgi/github/issues.dcgi"
-COMMITS_CGI="/cgi/github/commits.dcgi"
-PULLS_CGI="/cgi/github/pulls.dcgi"
+ISSUE_CGI="${CGI_BASEDIR}/github/issue.dcgi"
+ISSUES_CGI="${CGI_BASEDIR}/github/issues.dcgi"
+COMMITS_CGI="${CGI_BASEDIR}/github/commits.dcgi"
+PULLS_CGI="${CGI_BASEDIR}/github/pulls.dcgi"
case "$2" in
diff -r 58e3b383da25 -r 682ca5180ba4 instagram/comments.cgi
--- a/instagram/comments.cgi Wed Dec 05 00:17:52 2018 +0100
+++ b/instagram/comments.cgi Wed Dec 05 00:18:16 2018 +0100
@@ -1,7 +1,7 @@
#!/bin/sh
-CGI="/cgi/instagram/user.dcgi"
+CGI="${CGI_BASEDIR}/instagram/user.dcgi"
media="$2"
diff -r 58e3b383da25 -r 682ca5180ba4 instagram/user.dcgi
--- a/instagram/user.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/instagram/user.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,8 +2,8 @@
. ../common/config.sh
-COMMENTS_CGI="/cgi/instagram/comments.cgi"
-CGI="/cgi/instagram/user.dcgi"
+COMMENTS_CGI="${CGI_BASEDIR}/instagram/comments.cgi"
+CGI="${CGI_BASEDIR}/instagram/user.dcgi"
case "$2" in
diff -r 58e3b383da25 -r 682ca5180ba4 internazionale/sections.dcgi
--- a/internazionale/sections.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/internazionale/sections.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,8 +2,8 @@
. ../common/config.sh
-ARTICLE_CGI="/cgi/internazionale/article.cgi"
-CGI="/cgi/internazionale/sections.dcgi"
+ARTICLE_CGI="${CGI_BASEDIR}/internazionale/article.cgi"
+CGI="${CGI_BASEDIR}/internazionale/sections.dcgi"
section="${2%%/*}"
diff -r 58e3b383da25 -r 682ca5180ba4 lobsters/lobsters.dcgi
--- a/lobsters/lobsters.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/lobsters/lobsters.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,8 +2,8 @@
. ../common/config.sh
-CGI="/cgi/lobsters/lobsters.dcgi"
-COMMENTS_CGI="/cgi/lobsters/comments.dcgi"
+CGI="${CGI_BASEDIR}/lobsters/lobsters.dcgi"
+COMMENTS_CGI="${CGI_BASEDIR}/lobsters/comments.dcgi"
#
# FIXME: the logic in `newest' and `hottest' for pagination is broken
diff -r 58e3b383da25 -r 682ca5180ba4 lwn/feed.dcgi
--- a/lwn/feed.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/lwn/feed.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -5,7 +5,7 @@
FEED_AUTHOR=yes
FEED_DATE=yes
-ARTICLE_CGI="/cgi/lwn/article.cgi"
+ARTICLE_CGI="${CGI_BASEDIR}/lwn/article.cgi"
filter_entries()
{
diff -r 58e3b383da25 -r 682ca5180ba4 netbsd/req.dcgi
--- a/netbsd/req.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/netbsd/req.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,7 +2,7 @@
. ../common/config.sh
-CGI_TICKET="/cgi/netbsd/ticket.cgi"
+CGI_TICKET="${CGI_BASEDIR}/netbsd/ticket.cgi"
branch="$2"
diff -r 58e3b383da25 -r 682ca5180ba4 nntp/nntp.dcgi
--- a/nntp/nntp.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/nntp/nntp.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,8 +2,8 @@
. ../common/config.sh
-CGI="/cgi/nntp/nntp.dcgi"
-CGI_BODY="/cgi/nntp/nntp_body.cgi"
+CGI="${CGI_BASEDIR}/nntp/nntp.dcgi"
+CGI_BODY="${CGI_BASEDIR}/nntp/nntp_body.cgi"
NNTP_MESSAGES=100 # default number to over (+1)
NNTP_SERVER="news.gmane.org"
NNTP_PORT="119"
diff -r 58e3b383da25 -r 682ca5180ba4 raiplay/categoria.dcgi
--- a/raiplay/categoria.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/raiplay/categoria.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,7 +2,7 @@
. ../common/config.sh
-GENERE_CGI="/cgi/raiplay/genere.dcgi"
+GENERE_CGI="${CGI_BASEDIR}/raiplay/genere.dcgi"
case "$2" in
programmi | fiction | film | teatro | documentari | musica | cartonianimati )
diff -r 58e3b383da25 -r 682ca5180ba4 raiplay/elenco-programmi.dcgi
--- a/raiplay/elenco-programmi.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/raiplay/elenco-programmi.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,7 +2,7 @@
. ../common/config.sh
-PROGRAMMA_CGI="/cgi/raiplay/programma.dcgi"
+PROGRAMMA_CGI="${CGI_BASEDIR}/raiplay/programma.dcgi"
url="https://www.raiplay.it/dl/RaiTV/RaiPlayMobile/Prod/Config/programmiAZ-elenco.json"
diff -r 58e3b383da25 -r 682ca5180ba4 raiplay/genere.dcgi
--- a/raiplay/genere.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/raiplay/genere.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,7 +2,7 @@
. ../common/config.sh
-PROGRAMMA_CGI="/cgi/raiplay/programma.dcgi"
+PROGRAMMA_CGI="${CGI_BASEDIR}/raiplay/programma.dcgi"
case "$2" in
http*)
diff -r 58e3b383da25 -r 682ca5180ba4 raiplay/programma.dcgi
--- a/raiplay/programma.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/raiplay/programma.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,7 +2,7 @@
. ../common/config.sh
-PROGRAMMA_CGI="/cgi/raiplay/programma.dcgi"
+PROGRAMMA_CGI="${CGI_BASEDIR}/raiplay/programma.dcgi"
case "$2" in
http*)
diff -r 58e3b383da25 -r 682ca5180ba4 reddit/r.dcgi
--- a/reddit/r.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/reddit/r.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,8 +2,8 @@
. ../common/config.sh
-CGI="/cgi/reddit/r.dcgi"
-COMMENTS_CGI="/cgi/reddit/c.cgi"
+CGI="${CGI_BASEDIR}/reddit/r.dcgi"
+COMMENTS_CGI="${CGI_BASEDIR}/reddit/c.cgi"
case "$2" in
*/*)
diff -r 58e3b383da25 -r 682ca5180ba4 rep/rep.dcgi
--- a/rep/rep.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/rep/rep.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,7 +2,7 @@
. ../common/config.sh
-ARTICLE_CGI="/cgi/rep/article.cgi"
+ARTICLE_CGI="${CGI_BASEDIR}/rep/article.cgi"
#
# If an argument is provided use that as search criteria, otherwise just fetch
diff -r 58e3b383da25 -r 682ca5180ba4 technologyreview/feed.dcgi
--- a/technologyreview/feed.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/technologyreview/feed.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -5,7 +5,7 @@
FEED_AUTHOR=yes
FEED_DATE=yes
-ARTICLE_CGI="/cgi/technologyreview/article.cgi"
+ARTICLE_CGI="${CGI_BASEDIR}/technologyreview/article.cgi"
echo ""
echo "MIT Technology Review"
diff -r 58e3b383da25 -r 682ca5180ba4 theatlantic/feed.dcgi
--- a/theatlantic/feed.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/theatlantic/feed.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -5,7 +5,7 @@
FEED_AUTHOR=yes
FEED_DATE=yes
-ARTICLE_CGI="/cgi/theatlantic/article.cgi"
+ARTICLE_CGI="${CGI_BASEDIR}/theatlantic/article.cgi"
section_to_subtitle()
{
diff -r 58e3b383da25 -r 682ca5180ba4 theguardian/feed.dcgi
--- a/theguardian/feed.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/theguardian/feed.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -5,7 +5,7 @@
FEED_AUTHOR=yes
FEED_DATE=yes
-ARTICLE_CGI="/cgi/theguardian/article.cgi"
+ARTICLE_CGI="${CGI_BASEDIR}/theguardian/article.cgi"
section_to_subtitle()
{
diff -r 58e3b383da25 -r 682ca5180ba4 twitter/tweets.dcgi
--- a/twitter/tweets.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/twitter/tweets.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,4 +2,4 @@
. ../common/config.sh
-CGI="/cgi/twitter/tweets.dcgi" TWEET_USER="$2" PYTHONIOENCODING="utf-8" python2.7 tweets.py
+CGI="${CGI_BASEDIR}/twitter/tweets.dcgi" TWEET_USER="$2" PYTHONIOENCODING="utf-8" python2.7 tweets.py
diff -r 58e3b383da25 -r 682ca5180ba4 youtube/search.dcgi
--- a/youtube/search.dcgi Wed Dec 05 00:17:52 2018 +0100
+++ b/youtube/search.dcgi Wed Dec 05 00:18:16 2018 +0100
@@ -2,7 +2,7 @@
. ../common/config.sh
-SEARCH_CGI="/cgi/youtube/search.dcgi"
+SEARCH_CGI="${CGI_BASEDIR}/youtube/search.dcgi"
if [ -n "$1" ]; then
query=$(printf "%s" "$1" | vis -h)