2
0
mirror of https://github.com/bpkg/bpkg synced 2024-11-08 01:10:36 +00:00

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.
This commit is contained in:
Sebastian Schuberth 2015-06-25 16:10:31 +02:00
parent 9cd59f05f8
commit 5e36050143

View File

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