summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2025-04-09 17:12:51 -0300
committerEuAndreh <eu@euandre.org>2025-04-09 17:12:51 -0300
commitddeaed64bfb0380db415c6e4027f265f74c60ccd (patch)
treea87a8af58c08c716feb05b244186dcc7a59f3e0c
parentsrc/conf: Extract embedded-config from document header variables (diff)
downloadmkwb-ddeaed64bfb0380db415c6e4027f265f74c60ccd.tar.gz
mkwb-ddeaed64bfb0380db415c6e4027f265f74c60ccd.tar.xz
src/*: "./" is enough for sourcing with ".", no need to use realpath(1)
-rwxr-xr-xsrc/conf2
-rwxr-xr-xsrc/feed2
-rwxr-xr-xsrc/feedentry2
-rwxr-xr-xsrc/html2
-rwxr-xr-xsrc/indexbody2
-rwxr-xr-xsrc/indexentry2
-rwxr-xr-xsrc/sortdata2
7 files changed, 7 insertions, 7 deletions
diff --git a/src/conf b/src/conf
index b423e23..fcc1466 100755
--- a/src/conf
+++ b/src/conf
@@ -49,7 +49,7 @@ dateiso() {
CONF="${1:-}"
FILENAME="${2:-}"
eval "$(assert-arg -- "$CONF" 'CONF')"
-. "$(realpath -- "$CONF")"
+. ./"$CONF"
needs "${url_pre:-}" 'Missing required $url_pre (e.g. https://example.com)'
diff --git a/src/feed b/src/feed
index d49c894..5907bbe 100755
--- a/src/feed
+++ b/src/feed
@@ -10,7 +10,7 @@ GLOBALCONF="${1:-}"
FILENAME="${2:-}"
eval "$(assert-arg -- "$GLOBALCONF" 'GLOBALCONF')"
eval "$(assert-arg -- "$FILENAME" 'SORTDATA')"
-. "$(realpath -- "$GLOBALCONF")"
+. ./"$GLOBALCONF"
shift
diff --git a/src/feedentry b/src/feedentry
index 6299e6f..086d3fe 100755
--- a/src/feedentry
+++ b/src/feedentry
@@ -8,7 +8,7 @@ usage() {
FILENAME="${1:-}"
eval "$(assert-arg -- "$FILENAME" 'FILENAME.htmlbody')"
-. "$(realpath -- "${FILENAME%.*}.conf")"
+. ./"${FILENAME%.*}.conf"
update_xml=
diff --git a/src/html b/src/html
index 444e690..7e60841 100755
--- a/src/html
+++ b/src/html
@@ -28,7 +28,7 @@ shift $((OPTIND - 1))
FILENAME="${1:-}"
eval "$(assert-arg -- "$FILENAME" 'FILENAME.htmlbody')"
-. "$(realpath -- "${FILENAME%.*}.conf")"
+. ./"${FILENAME%.*}.conf"
dates() {
diff --git a/src/indexbody b/src/indexbody
index c00bbab..c76f6be 100755
--- a/src/indexbody
+++ b/src/indexbody
@@ -8,7 +8,7 @@ usage() {
FILENAME="${1:-}"
eval "$(assert-arg -- "$FILENAME" 'FILENAME.conf')"
-. "$(realpath -- "$FILENAME")"
+. ./"$FILENAME"
shift
diff --git a/src/indexentry b/src/indexentry
index 6b5af5b..2316138 100755
--- a/src/indexentry
+++ b/src/indexentry
@@ -8,7 +8,7 @@ usage() {
FILENAME="${1:-}"
eval "$(assert-arg -- "$FILENAME" 'FILENAME.conf')"
-. "$(realpath -- "$FILENAME")"
+. ./"$FILENAME"
cat <<EOF
diff --git a/src/sortdata b/src/sortdata
index c15d13c..aae8c86 100755
--- a/src/sortdata
+++ b/src/sortdata
@@ -8,7 +8,7 @@ usage() {
FILENAME="${1:-}"
eval "$(assert-arg -- "$FILENAME" 'FILENAME.conf')"
-. "$(realpath -- "$FILENAME")"
+. ./"$FILENAME"
DIR="$(dirname "$FILENAME")"/../../..