Skip to content

Commit 004dd56

Browse files
Create dotnet symlink during RPM install (#53705)
1 parent a822d39 commit 004dd56

File tree

3 files changed

+18
-0
lines changed

3 files changed

+18
-0
lines changed

src/installer/pkg/sfx/installers/dotnet-host.proj

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@
1717
<IncludeVersionInMacOSComponentName>false</IncludeVersionInMacOSComponentName>
1818
<MacOSScriptsDirectory>osx_scripts/host</MacOSScriptsDirectory>
1919
<MacOSPackageDescription>The .NET Shared Host.</MacOSPackageDescription>
20+
<RpmScriptsDirectory>$(MSBuildThisFileDirectory)rpm_scripts/host</RpmScriptsDirectory>
21+
<RpmAfterInstallScript>$(RpmScriptsDirectory)/after_install.sh</RpmAfterInstallScript>
22+
<RpmAfterRemoveScript>$(RpmScriptsDirectory)/after_remove.sh</RpmAfterRemoveScript>
2023
</PropertyGroup>
2124

2225
<ItemGroup>
@@ -68,6 +71,8 @@
6871
<ItemGroup>
6972
<DebJsonProperty Include="symlinks" Object="{ &quot;dotnet&quot;: &quot;/usr/bin/dotnet&quot; }" />
7073
<RpmJsonProperty Include="directories" Object="[ &quot;/usr/share/dotnet&quot;, &quot;/usr/share/doc/dotnet-host&quot; ]" />
74+
<RpmJsonProperty Include="after_install_source" Object="&quot;$(RpmAfterInstallScript)&quot;" />
75+
<RpmJsonProperty Include="after_remove_source" Object="&quot;$(RpmAfterRemoveScript)&quot;" />
7176
<PackageConflictsProperty Include="package_conflicts" Object="[ &quot;dotnet&quot;, &quot;dotnet-nightly&quot; ]" />
7277
<DebJsonProperty Include="@(PackageConflictsProperty)" />
7378
<RpmJsonProperty Include="@(PackageConflictsProperty)" />
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
#!/usr/bin/env bash
2+
3+
if [[ -L /usr/local/bin/dotnet ]]; then
4+
rm /usr/local/bin/dotnet
5+
fi
6+
ln -s /usr/share/dotnet/dotnet /usr/local/bin/dotnet
7+
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/usr/bin/env bash
2+
3+
if [[ -L /usr/local/bin/dotnet ]]; then
4+
rm /usr/local/bin/dotnet && \
5+
fi
6+

0 commit comments

Comments
 (0)