aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron W. Swenson <aaron@grandmasfridge.org>2018-01-14 11:19:12 -0500
committerAaron W. Swenson <aaron@grandmasfridge.org>2018-01-14 11:19:12 -0500
commit620d893f7e52f810e40b470761e00f5454fdae36 (patch)
tree4eaabdc765bd4f50076f3bda6ce8617d04692ca3
parentForce symlinks (diff)
downloadeselect-620d893f7e52f810e40b470761e00f5454fdae36.tar.gz
eselect-620d893f7e52f810e40b470761e00f5454fdae36.tar.bz2
eselect-620d893f7e52f810e40b470761e00f5454fdae36.zip
More concise die messages
-rw-r--r--postgresql.eselect11
1 files changed, 7 insertions, 4 deletions
diff --git a/postgresql.eselect b/postgresql.eselect
index aa89b49..d05f724 100644
--- a/postgresql.eselect
+++ b/postgresql.eselect
@@ -97,7 +97,8 @@ linker() {
# Create relative links so that they work both here and inside the new
# root if $ROOT is not "/".
rel_source=$(relative_name "${link_source}" "${target_dir}")
- ln -sf "${rel_source}" "${link_target}" || die -q "Unable to create link!"
+ ln -sf "${rel_source}" "${link_target}" || \
+ die -q "SYMLINK FAILED: ${rel_source} -> ${link_target}"
done
}
@@ -226,7 +227,7 @@ do_set() {
rel_source=$(relative_name "${include_sources[$i]}" "$(dirname "${INCLUDE_TARGETS[$i]}")")
ln -sf "$rel_source" "${INCLUDE_TARGETS[$i]}" || \
- die -q "Unable to create link! $rel_source -> ${INCLUDE_TARGETS[$i]}"
+ die -q "SYMLINK FAILED: $rel_source -> ${INCLUDE_TARGETS[$i]}"
done
# Link modules to /usr/lib{,32,64}/
@@ -235,7 +236,8 @@ do_set() {
if [[ -d "${USR_PATH}/${x}/postgresql-${slot}/${x}" ]] ; then
# 'linker' function doesn't work for linking directories.
# Default lib path - create a relative link
- ln -sf "postgresql-${slot}/${x}" "${USR_PATH}/${x}/postgresql"
+ ln -sf "postgresql-${slot}/${x}" "${USR_PATH}/${x}/postgresql" || \
+ die -q "SYMLINK FAILED: postgresql-${slot}/${x} -> ${USR_PATH}/${x}/postgresql"
# Linker works for files
linker "${USR_PATH}/${x}/postgresql-${slot}/${x}/" \
@@ -264,7 +266,8 @@ do_set() {
# Default share path - use a relative link here by just specifying the
# base name
- ln -sf "postgresql-${slot}" "${USR_PATH}/share/postgresql"
+ ln -sf "postgresql-${slot}" "${USR_PATH}/share/postgresql" || \
+ die -q "SYMLINK FAILED: postgresql-${slot} -> ${USR_PATH}/share/postgresql"
echo "success!"
}