aboutsummaryrefslogtreecommitdiff
path: root/libs
diff options
context:
space:
mode:
authorUlrich Müller <ulm@gentoo.org>2018-05-29 18:33:42 +0200
committerUlrich Müller <ulm@gentoo.org>2018-05-29 18:33:42 +0200
commitcd03bb12fa2799c76987346f6834b78fda9285a7 (patch)
treebd8994a05ab6ba68c147df61b7c66968cb907b63 /libs
parentUpdate version to 1.4.12. (diff)
downloadeselect-cd03bb12fa2799c76987346f6834b78fda9285a7.tar.gz
eselect-cd03bb12fa2799c76987346f6834b78fda9285a7.tar.bz2
eselect-cd03bb12fa2799c76987346f6834b78fda9285a7.zip
New get_libdir function.
* libs/multilib.bash.in (get_libdir): New function. * doc/developer-guide.txt: Describe it. * libs/Makefile.am (dosed): Substitute @libdir@. * misc/eselect-mode.el (eselect-mode-keywords-multilib): Add get_libdir.
Diffstat (limited to 'libs')
-rw-r--r--libs/Makefile.am3
-rw-r--r--libs/multilib.bash.in7
2 files changed, 9 insertions, 1 deletions
diff --git a/libs/Makefile.am b/libs/Makefile.am
index 027ef73..6ebd08e 100644
--- a/libs/Makefile.am
+++ b/libs/Makefile.am
@@ -30,7 +30,8 @@ dosed = @SED@ \
-e 's%\@SED\@%@SED@%g' \
-e 's%\@PORTAGEQ\@%@PORTAGEQ@%g' \
-e 's%\@ENV_UPDATE\@%@ENV_UPDATE@%g' \
- -e 's%\@CANONICALISE\@%@CANONICALISE@%g'
+ -e 's%\@CANONICALISE\@%@CANONICALISE@%g' \
+ -e 's%\@libdir\@%@libdir@%g'
%.bash : %.bash.in
@$(dosed) $< > $@
diff --git a/libs/multilib.bash.in b/libs/multilib.bash.in
index 4225adb..e84670e 100644
--- a/libs/multilib.bash.in
+++ b/libs/multilib.bash.in
@@ -28,3 +28,10 @@ list_libdirs() {
done
echo "${libdirs[@]}"
}
+
+# get_libdir
+# Print the basename of the libdir path
+get_libdir() {
+ local libdir="@libdir@"
+ echo "${libdir##*/}"
+}