wineprefixcreate: Only create links for files that don't exist.
Make a copy instead of a link if the original file is writable.
This commit is contained in:
parent
ab5ca5c048
commit
2d3bd3e45a
|
@ -145,7 +145,16 @@ done
|
||||||
|
|
||||||
link_app()
|
link_app()
|
||||||
{
|
{
|
||||||
rm -f "$2" && ln -s "$dlldir/$1.exe.so" "$2" || echo "Warning: failed to create $2"
|
if [ ! -f "$2" ]
|
||||||
|
then
|
||||||
|
# make a copy if the original is writable
|
||||||
|
if [ -w "$dlldir/$1.exe.so" ]
|
||||||
|
then
|
||||||
|
cp "$dlldir/$1.exe.so" "$2" || echo "Warning: failed to create $2"
|
||||||
|
else
|
||||||
|
ln -s "$dlldir/$1.exe.so" "$2" || echo "Warning: failed to create $2"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
link_app start "$CROOT/windows/command/start.exe"
|
link_app start "$CROOT/windows/command/start.exe"
|
||||||
|
|
Loading…
Reference in New Issue