diff options
author | Alex Crichton <alex@alexcrichton.com> | 2018-02-16 21:35:48 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-16 21:35:48 -0600 |
commit | 2d9d3ff2006ecce149a4d53c6764baf8392d21cb (patch) | |
tree | f069dda4954e2a11171f3f6d7afad1a7319bdc19 | |
parent | 1fa2acb25d98d0ce9e22284f5a321d89916acd09 (diff) | |
parent | 107a37b6c563fe13fa2064b4dda1e19bc4433f92 (diff) | |
download | rust-installer-2d9d3ff2006ecce149a4d53c6764baf8392d21cb.tar.gz |
Merge pull request #78 from Keruspe/master
install-template: allow overriding datadir
-rw-r--r-- | install-template.sh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/install-template.sh b/install-template.sh index e584aa0..adb4563 100644 --- a/install-template.sh +++ b/install-template.sh @@ -577,6 +577,12 @@ install_components() { _file_install_path="$CFG_LIBDIR/$_f" fi + if echo "$_file" | grep "^share" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^share\///')" + _file_install_path="$CFG_DATADIR/$_f" + fi + if echo "$_file" | grep "^share/man/" > /dev/null then local _f="$(echo "$_file" | sed 's/^share\/man\///')" @@ -813,7 +819,9 @@ flag list-components "list available components" valopt sysconfdir "$CFG_DESTDIR_PREFIX/etc" "install system configuration files" valopt bindir "$CFG_DESTDIR_PREFIX/bin" "install binaries" valopt libdir "$CFG_DESTDIR_PREFIX/lib" "install libraries" -valopt mandir "$CFG_DESTDIR_PREFIX/share/man" "install man pages in PATH" +valopt datadir "$CFG_DESTDIR_PREFIX/share" "install data" +# NB We repeat datadir default value because we don't set CFG_DATADIR in --help +valopt mandir "${CFG_DATADIR-"$CFG_DESTDIR_PREFIX/share"}/man" "install man pages in PATH" # NB See the docdir handling in install_components for an explanation of this # weird <default> string valopt docdir "\<default\>" "install documentation in PATH" |