2015-11-13 21:54:44 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2015-12-16 21:01:21 +00:00
|
|
|
export BIN=$(pwd)/bin
|
|
|
|
|
2015-12-23 20:29:08 +00:00
|
|
|
mkdir -p $BIN/Modules
|
2015-12-16 23:34:05 +00:00
|
|
|
|
2015-12-21 21:41:30 +00:00
|
|
|
# Deploy PowerShell modules
|
2015-12-16 23:34:05 +00:00
|
|
|
(
|
|
|
|
cd $BIN/Modules
|
2016-01-15 00:17:50 +00:00
|
|
|
ln -sf ../../test/Pester .
|
2015-12-21 21:41:30 +00:00
|
|
|
ln -sf ../../src/monad/monad/miscfiles/modules/Microsoft.PowerShell.Utility .
|
2015-12-23 20:29:08 +00:00
|
|
|
OMI=Microsoft.PowerShell.Commands.Omi
|
|
|
|
mkdir -p $OMI
|
|
|
|
ln -sf $BIN/$OMI.dll $OMI/
|
2015-12-16 23:34:05 +00:00
|
|
|
)
|
2015-12-16 21:01:21 +00:00
|
|
|
|
2015-12-14 18:36:40 +00:00
|
|
|
# Build native components
|
|
|
|
(
|
2016-01-14 18:32:02 +00:00
|
|
|
cd src/libpsl-native
|
2015-12-14 18:36:40 +00:00
|
|
|
cmake -DCMAKE_BUILD_TYPE=Debug .
|
|
|
|
make -j
|
2015-12-16 21:01:21 +00:00
|
|
|
ctest -V
|
2016-01-15 07:16:43 +00:00
|
|
|
cp src/libpsl-native.* $BIN
|
2015-12-16 21:01:21 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
# Build registry stub (this should go away, again)
|
|
|
|
(
|
|
|
|
cd src/registry-stub
|
|
|
|
make
|
|
|
|
cp api-ms-win-core-registry-l1-1-0.dll $BIN
|
2015-12-14 18:36:40 +00:00
|
|
|
)
|
|
|
|
|
2015-12-10 20:33:52 +00:00
|
|
|
# Publish PowerShell
|
2015-12-14 18:36:40 +00:00
|
|
|
(
|
|
|
|
cd src/Microsoft.PowerShell.Linux.Host
|
2016-01-15 07:16:43 +00:00
|
|
|
dotnet publish --framework dnxcore50 --output $BIN
|
2015-12-23 01:03:14 +00:00
|
|
|
# Copy files that dotnet-publish does not currently deploy
|
|
|
|
cp *_profile.ps1 $BIN
|
|
|
|
)
|
|
|
|
|
|
|
|
# Symlink types and format files to correct names
|
|
|
|
(
|
|
|
|
cd $BIN
|
|
|
|
|
|
|
|
ln -sf ../src/monad/monad/miscfiles/types/CoreClr/types.ps1xml .
|
|
|
|
ln -sf ../src/monad/monad/miscfiles/types/CoreClr/typesv3.ps1xml .
|
|
|
|
|
|
|
|
ln -sf ../src/monad/monad/miscfiles/display/Certificate.format.ps1xml .
|
|
|
|
ln -sf ../src/monad/monad/miscfiles/display/Diagnostics.Format.ps1xml Diagnostics.format.ps1xml
|
|
|
|
ln -sf ../src/monad/monad/miscfiles/display/DotNetTypes.format.ps1xml .
|
|
|
|
ln -sf ../src/monad/monad/miscfiles/display/Event.format.ps1xml .
|
|
|
|
ln -sf ../src/monad/monad/miscfiles/display/FileSystem.format.ps1xml .
|
|
|
|
ln -sf ../src/monad/monad/miscfiles/display/Help.format.ps1xml .
|
|
|
|
ln -sf ../src/monad/monad/miscfiles/display/HelpV3.format.ps1xml .
|
|
|
|
ln -sf ../src/monad/monad/miscfiles/display/PowerShellCore.format.ps1xml .
|
|
|
|
ln -sf ../src/monad/monad/miscfiles/display/PowerShellTrace.format.ps1xml .
|
|
|
|
ln -sf ../src/monad/monad/miscfiles/display/Registry.format.ps1xml .
|
|
|
|
ln -sf ../src/monad/monad/miscfiles/display/WSMan.format.ps1xml .
|
2015-12-14 18:36:40 +00:00
|
|
|
)
|