Skip to content

Commit 9641856

Browse files
committed
Only run ldconfig on Linux
1 parent 5ee270a commit 9641856

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/etc/install.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,11 +293,9 @@ elif [ "$CFG_OSTYPE" = "Darwin" ]
293293
then
294294
CFG_LD_PATH_VAR=DYLD_LIBRARY_PATH
295295
CFG_OLD_LD_PATH_VAR=$DYLD_LIBRARY_PATH
296-
UNIX=1
297296
else
298297
CFG_LD_PATH_VAR=LD_LIBRARY_PATH
299298
CFG_OLD_LD_PATH_VAR=$LD_LIBRARY_PATH
300-
UNIX=1
301299
fi
302300

303301
flag uninstall "only uninstall from the installation prefix"
@@ -469,13 +467,13 @@ while read p; do
469467
done < "${CFG_SRC_DIR}/${CFG_LIBDIR_RELATIVE}/rustlib/manifest.in"
470468

471469
# Run ldconfig to make dynamic libraries available to the linker
472-
if [ $UNIX -eq 1 ]
470+
if [ "$CFG_OSTYPE" = "Linux" ]
473471
then
474472
ldconfig
475473
if [ $? -ne 0 ]
476474
then
477-
warn "failed to run ldconfig."
478-
warn "this may happen when not installing as root, in which case you know what you are doing and it's probably fine."
475+
warn "failed to run ldconfig."
476+
warn "this may happen when not installing as root and may be fine"
479477
fi
480478
fi
481479

0 commit comments

Comments
 (0)