Skip to content

Commit 056d008

Browse files
committed
scripts/installer: avoid SCM-tracking a symlink to NUT source root
Signed-off-by: Jim Klimov <jimklimov+nut@gmail.com>
1 parent c05ca1f commit 056d008

3 files changed

Lines changed: 14 additions & 7 deletions

File tree

scripts/installer/Makefile.am

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,10 @@ EXTRA_DIST = \
3232

3333
SPELLCHECK_SRC = README.adoc common/README_ipp-os-shutdown.adoc
3434

35+
nut:
36+
rm -f "$@"
37+
$(LN_S) $(top_srcdir) "$@"
38+
3539
# NOTE: Due to portability, we do not use a GNU percent-wildcard extension.
3640
# We also have to export some variables that may be tainted by relative
3741
# paths when parsing the other makefile (e.g. MKDIR_P that may be defined
@@ -54,4 +58,8 @@ spellcheck spellcheck-interactive spellcheck-sortdict:
5458

5559
CLEANFILES = *-spellchecked
5660

61+
# Remove "nut" if it is a symlink to the source tree
62+
clean-local:
63+
if test -L nut || test -h nut ; then rm -f nut ; fi
64+
5765
MAINTAINERCLEANFILES = Makefile.in .dirstamp

scripts/installer/README.adoc

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,13 @@ of Eaton by Frederic Bohe, Vaclav Krpec, Arnaud Quette and Jim Klimov.
88

99
This includes the package (tarball) creation script which relies on
1010
presence of third-party library binaries in a `$ARCH/libs` directory,
11-
and init-scripts from NUT source tree (originally expected as a "nut"
12-
subdirectory), as well as an interactive installer script to set up
13-
the package on a target deployment covering package (re-)installation,
14-
initial device discovery, password setup, etc., and helper scripts
15-
for status overview and shutdown handling.
11+
and init-scripts from NUT source tree (originally expected as a `nut`
12+
subdirectory, can be a symlink to `../..`), as well as an interactive
13+
installer script to set up the package on a target deployment covering
14+
package (re-)installation, initial device discovery, password setup,
15+
etc., and helper scripts for status overview and shutdown handling.
1616

17-
The installer relies on "nutconf" tool (emulating dummy script for
17+
The installer relies on `nutconf` tool (emulating dummy script for
1818
tests provided here), which is part of NUT sources.
1919

2020
Note that heavy use of `LD_LIBRARY_PATH` in these scripts may become

scripts/installer/nut

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)