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.
pull/46/head
Sebastian Schuberth 9 years ago
parent 9cd59f05f8
commit 5e36050143

@ -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 $?
}

Loading…
Cancel
Save