mirror of
https://github.com/diddlesnaps/makemkv.git
synced 2026-01-20 13:08:19 -05:00
Fix reference to LD_LIBRARY_PATH missing last H. Signed-off-by: Daniel Llewellyn <daniel@bowlhat.net>
17 lines
619 B
Bash
Executable File
17 lines
619 B
Bash
Executable File
#!/bin/bash -ex
|
|
|
|
# delete empty entries in the LD_LIBRARY_PATH
|
|
# i.e. change "/a/b/c:/1/2/3::/other" into "/a/b/c:/1/2/3:/other"
|
|
# if we don't do this, then ldconfig gets confused with "" as arguments of dirs
|
|
# to add to the cache
|
|
LD_LIBRARY_PATH="${LD_LIBRARY_PATH//::/:}"
|
|
# Remove leading empty element if it exists
|
|
LD_LIBRARY_PATH="${LD_LIBRARY_PATH#:}"
|
|
# Remove trailing empty element if it exists
|
|
LD_LIBRARY_PATH="${LD_LIBRARY_PATH%:}"
|
|
|
|
# run ldconfig on our LD_LIBRARY_PATH lib dirs
|
|
IFS=':' read -ra PATHS <<< "$LD_LIBRARY_PATH"
|
|
mkdir -p "$SNAP_DATA/etc"
|
|
ldconfig -v -C "$SNAP_DATA/etc/ld.so.cache" "${PATHS[@]}"
|