#!/bin/sh echo "############### wearable-dotnet-generate-ni.post ################" SYSTEM_DIRS=" /usr/share/dotnet.tizen/netcoreapp /usr/share/dotnet.tizen/framework " export IBCDATA_DIR=/usr/share/dotnet.tizen/ibcdata export COMPlus_UseIBCFile=1 export COMPlus_IBCFileDir=$IBCDATA_DIR # remove previous native image dotnettool --ni-reset-system # generate SPC native image and remove origin dotnettool --ni-dll /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll if [ -f '/usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup' ] then echo "remove origin file : System.Private.CoreLib.dll.Backup" rm -f /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup touch /usr/share/dotnet.tizen/netcoreapp/System.Private.CoreLib.dll.Backup fi # generate ni file and remove origin dll file for target_dir in $SYSTEM_DIRS do for target_dll in $target_dir/*.dll; do dotnettool --ni-dll $target_dll; if [ -f ${target_dll//.dll/.ni.dll} ] then echo "remove origin file : $target_dll" rm -f $target_dll fi done; done; # remove ibc data if [ -d $IBCDATA_DIR ] then echo "remove ibc data and directory" rm -rf $IBCDATA_DIR fi