From 5e36050143c0eb71facd185c66070cef8f03fb5f Mon Sep 17 00:00:00 2001 From: Sebastian Schuberth Date: Thu, 25 Jun 2015 16:10:31 +0200 Subject: [PATCH] Support installing on file systems that do not support symbolic links When cloning a Git repository that contains symbolic links to a file system that does not support symbolic links, Git replaces the links with plain text files that contain the path to the target file. If we encouter such files, install the linked source file rather than the link. --- setup.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/setup.sh b/setup.sh index b589cf2..cd96693 100755 --- a/setup.sh +++ b/setup.sh @@ -69,9 +69,11 @@ make_install () { make_uninstall echo " info: Installing $PREFIX/bin/$BIN..." install -d "$PREFIX/bin" - install "$BIN" "$PREFIX/bin" + local source=$(<$BIN) + [ -f "$source" ] && install "$source" "$PREFIX/bin/$BIN" || install "$BIN" "$PREFIX/bin" for cmd in $CMDS; do - install "$BIN-$cmd" "$PREFIX/bin" + source=$(<$BIN-$cmd) + [ -f "$source" ] && install "$source" "$PREFIX/bin/$BIN-$cmd" || install "$BIN-$cmd" "$PREFIX/bin" done return $? }