From 7ddadb3c06828d4bc36a3de8fcf12b651e7855d2 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Sun, 28 Feb 2021 10:13:35 -0700 Subject: [PATCH] Markdown.pm: make Markdown module available to use In order for the "Markdown" module to be available to "use", this must succeed: use Markdown; But it must succeed in two different environments: 1) the pre-install environment 2) the post-install environment In the first case, that means a symbolic link into the checked out markdown.git project. In the second case, that means installing a symbolic link into $Girocco::Config::basedir that points to the installed copy of Markdown.pl. Since "use" statements are processed even when just using the `perl -c` command to check syntax, failing to address the first case would make it very difficult to check syntax prior to installation or use any module during installation that referenced the Markdown module even if the Markdown functions were not actually being called. Signed-off-by: Kyle J. McKay --- Markdown.pm | 1 + install.sh | 2 ++ 2 files changed, 3 insertions(+) create mode 120000 Markdown.pm diff --git a/Markdown.pm b/Markdown.pm new file mode 120000 index 0000000..0bfd37d --- /dev/null +++ b/Markdown.pm @@ -0,0 +1 @@ +markdown.git/Markdown.pl \ No newline at end of file diff --git a/install.sh b/install.sh index 79e6eab..35abb48 100755 --- a/install.sh +++ b/install.sh @@ -830,6 +830,8 @@ mkdir -p "$basedir"/bin chmod a+x "$basedir"/bin/Markdown.pl.$$ && mv -f "$basedir"/bin/Markdown.pl.$$ "$basedir"/bin/Markdown.pl) test $? -eq 0 +(umask 0133 && ln -s -f -n bin/Markdown.pl "$basedir"/Markdown.pm) +test $? -eq 0 # Some permission sanity on basedir/bin just in case find -H "$basedir"/bin -type f -exec chmod go-w '{}' + -- 2.11.4.GIT