From 3544aed0e53f4c7d3618637c41f39c4ded8163ea Mon Sep 17 00:00:00 2001 From: Marc-Antoine Perennou Date: Fri, 28 Apr 2017 10:30:30 +0200 Subject: [PATCH 1/2] add --bindir support Signed-off-by: Marc-Antoine Perennou --- install-template.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install-template.sh b/install-template.sh index 0d6efc7..6476814 100644 --- a/install-template.sh +++ b/install-template.sh @@ -615,6 +615,12 @@ install_components() { # Decide the destination of the file local _file_install_path="$_dest_prefix/$_file" + if echo "$_file" | grep "^bin/" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^bin\///')" + _file_install_path="$CFG_BINDIR/$_f" + fi + if echo "$_file" | grep "^lib/" > /dev/null then local _f="$(echo "$_file" | sed 's/^lib\///')" @@ -854,6 +860,7 @@ fi valopt without "" "comma-separated list of components to not install" valopt components "" "comma-separated list of components to install" flag list-components "list available components" +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" # NB See the docdir handling in install_components for an explanation of this From 524a5642f587d8d90fe4945505517fa933f936a3 Mon Sep 17 00:00:00 2001 From: Marc-Antoine Perennou Date: Fri, 28 Apr 2017 11:15:03 +0200 Subject: [PATCH 2/2] add --sysconfdir support Signed-off-by: Marc-Antoine Perennou --- install-template.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/install-template.sh b/install-template.sh index 6476814..02070c3 100644 --- a/install-template.sh +++ b/install-template.sh @@ -615,6 +615,12 @@ install_components() { # Decide the destination of the file local _file_install_path="$_dest_prefix/$_file" + if echo "$_file" | grep "^etc/" > /dev/null + then + local _f="$(echo "$_file" | sed 's/^etc\///')" + _file_install_path="$CFG_SYSCONFDIR/$_f" + fi + if echo "$_file" | grep "^bin/" > /dev/null then local _f="$(echo "$_file" | sed 's/^bin\///')" @@ -860,6 +866,7 @@ fi valopt without "" "comma-separated list of components to not install" valopt components "" "comma-separated list of components to install" flag list-components "list available components" +valopt sysconfdir "/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"