Last active
October 14, 2021 13:24
-
-
Save brettpetch/58cd7c73537065942a7e78d3cb03022f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# BDInfoCLI-ng Install Script | |
# Requires Swizzin and mono, Still in very very early beta. | |
# Should sorta-kinda work. | |
# Elevate like this ``sudo su -`` | |
# Place me at ``/root/`` and ``chmod +x /root/bdinfo-install.sh && ./bdinfo-install.sh`` | |
. /etc/swizzin/sources/globals.sh | |
. /etc/swizzin/sources/functions/mono | |
user=$(cut -d: -f1 < /root/.master.info) | |
function _install() { | |
mono_repo_update | |
apt_update | |
apt_install nuget | |
mkdir -p /home/$user/scripts/ | |
chown -R $user:$user /home/$user/scripts | |
git clone https://github.com/zoffline/BDInfoCLI-ng.git /home/$user/scripts/BDInfoCLI-ng | |
cd /home/$user/scripts/BDInfoCLI-ng/ || exit | |
nuget restore -NonInteractive | |
mkdir /home/$user/scripts/bdinfo | |
xbuild /property:Configuration=Release /property:OutDir=/home/$user/scripts/bdinfo/ | |
rm -rf /home/$user/scripts/BDInfoCLI-ng/ | |
chown -R $user:$user /home/$user/scripts/ | |
cd /home/$user/scripts/bdinfo/ || exit | |
# todo: create a runscript to pass stuff thru. | |
} | |
function _remove() { | |
apt_remove nuget | |
rm -rf /home/$user/scripts/bdinfo | |
} | |
echo "What do you like to do?" | |
echo "" | |
echo "install = Install bdinfo" | |
echo "uninstall = Completely removes bdinfo" | |
echo "exit = Exits Installer" | |
while true; do | |
read -r -p "Enter it here: " choice | |
case $choice in | |
"install") | |
_install | |
break | |
;; | |
"uninstall") | |
_remove | |
break | |
;; | |
"exit") | |
break | |
;; | |
*) | |
echo "Unknown Option." | |
;; | |
esac | |
done | |
exit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# bdinfo.sh to be placed at /home/$i/ for fast runs. | |
user=$(whoami) | |
mkdir -p /home/$user/bdinfo | |
mono /home/$user/scripts/bdinfo/BDInfo.exe $1 /home/$user/bdinfo/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
root@box:~# bash <(curl -sL https://gist.github.com/brettpetch/58cd7c73537065942a7e78d3cb03022f/raw/6143fbd34f1e694251f37d015c2f17ac6e32c715/bdinfo-install.sh) | |
What do you like to do? | |
install = Install bdinfo | |
uninstall = Completely removes bdinfo | |
exit = Exits Installer | |
Enter it here: install | |
... Performing apt update | |
✔ Done | |
... Performing installation of 1 apt packages | |
(nuget) | |
✔ Apt install complete | |
Cloning into '/home/user01/scripts/BDInfoCLI-ng'... | |
remote: Enumerating objects: 777, done. | |
remote: Counting objects: 100% (10/10), done. | |
remote: Compressing objects: 100% (9/9), done. | |
remote: Total 777 (delta 4), reused 4 (delta 1), pack-reused 767 | |
Receiving objects: 100% (777/777), 2.79 MiB | 1.29 MiB/s, done. | |
Resolving deltas: 100% (524/524), done. | |
Installing 'ZedGraph 5.1.7'. | |
Installing 'Discutils 0.11.0.2'. | |
Installing 'Microsoft.WindowsAPICodePack-Core 1.1.0.2'. | |
Installing 'Microsoft.WindowsAPICodePack-Shell 1.1.0.0'. | |
Successfully installed 'Microsoft.WindowsAPICodePack-Core 1.1.0.2'. | |
Successfully installed 'Microsoft.WindowsAPICodePack-Shell 1.1.0.0'. | |
Successfully installed 'ZedGraph 5.1.7'. | |
Successfully installed 'Discutils 0.11.0.2'. | |
mkdir: cannot create directory ‘/home/user01/scripts/bdinfo’: File exists | |
>>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<< | |
XBuild Engine Version 14.0 | |
Mono, Version 6.8.0.105 | |
Copyright (C) 2005-2013 Various Mono authors | |
Build started 10/14/2021 3:21:48 PM. | |
__________________________________________________ | |
Project "/home/user01/scripts/BDInfoCLI-ng/BDInfo.sln" (default target(s)): | |
Target ValidateSolutionConfiguration: | |
Building solution configuration "Release|Any CPU". | |
Target Build: | |
Project "/home/user01/scripts/BDInfoCLI-ng/BDInfo/BDInfo.csproj" (default target(s)): | |
Target PrepareForBuild: | |
Configuration: Release Platform: AnyCPU | |
Created directory "obj/Release/" | |
Target CopyFilesMarkedCopyLocal: | |
Copying file from '/home/user01/scripts/BDInfoCLI-ng/packages/Discutils.0.11.0.2/lib/net40/DiscUtils.dll' to '/home/user01/scripts/bdinfo/DiscUtils.dll' | |
Copying file from '/home/user01/scripts/BDInfoCLI-ng/packages/Discutils.0.11.0.2/lib/net40/DiscUtils.Common.dll' to '/home/user01/scripts/bdinfo/DiscUtils.Common.dll' | |
Copying file from '/home/user01/scripts/BDInfoCLI-ng/packages/Microsoft.WindowsAPICodePack-Core.1.1.0.2/lib/Microsoft.WindowsAPICodePack.dll' to '/home/user01/scripts/bdinfo/Microsoft.WindowsAPICodePack.dll' | |
Copying file from '/home/user01/scripts/BDInfoCLI-ng/packages/Microsoft.WindowsAPICodePack-Shell.1.1.0.0/lib/Microsoft.WindowsAPICodePack.Shell.dll' to '/home/user01/scripts/bdinfo/Microsoft.WindowsAPICodePack.Shell.dll' | |
Copying file from '/home/user01/scripts/BDInfoCLI-ng/packages/Microsoft.WindowsAPICodePack-Shell.1.1.0.0/lib/Microsoft.WindowsAPICodePack.ShellExtensions.dll' to '/home/user01/scripts/bdinfo/Microsoft.WindowsAPICodePack.ShellExtensions.dll' | |
Copying file from '/home/user01/scripts/BDInfoCLI-ng/packages/ZedGraph.5.1.7/lib/net35-Client/ZedGraph.dll' to '/home/user01/scripts/bdinfo/ZedGraph.dll' | |
Target GenerateResources: | |
Tool /usr/lib/mono/4.5/resgen.exe execution started with arguments: /useSourcePath /compile "FormChart.resx,obj/Release/BDInfo.FormChart.resources" | |
Tool /usr/lib/mono/4.5/resgen.exe execution started with arguments: /useSourcePath /compile "FormMain.resx,obj/Release/BDInfo.FormMain.resources" | |
Tool /usr/lib/mono/4.5/resgen.exe execution started with arguments: /useSourcePath /compile "FormPlaylist.resx,obj/Release/BDInfo.FormPlaylist.resources" | |
Tool /usr/lib/mono/4.5/resgen.exe execution started with arguments: /useSourcePath /compile "FormReport.resx,obj/Release/BDInfo.FormReport.resources" | |
Tool /usr/lib/mono/4.5/resgen.exe execution started with arguments: /useSourcePath /compile "FormSettings.resx,obj/Release/BDInfo.FormSettings.resources" | |
Tool /usr/lib/mono/4.5/resgen.exe execution started with arguments: /useSourcePath /compile "Properties/Resources.resx,obj/Release/BDInfo.Properties.Resources.resources" | |
Target GenerateSatelliteAssemblies: | |
No input files were specified for target GenerateSatelliteAssemblies, skipping. | |
Target CoreCompile: | |
Tool /usr/lib/mono/4.5/mcs.exe execution started with arguments: /noconfig /debug:pdbonly /optimize+ /out:obj/Release/BDInfo.exe /resource:obj/Release/BDInfo.FormChart.resources /resource:obj/Release/BDInfo.FormMain.resources /resource:obj/Release/BDInfo.FormPlaylist.resources /resource:obj/Release/BDInfo.FormReport.resources /resource:obj/Release/BDInfo.FormSettings.resources /resource:obj/Release/BDInfo.Properties.Resources.resources BDROM/TSCodecAC3.cs BDROM/TSCodecAVC.cs BDROM/BDROM.cs BDROM/TSCodecDTS.cs BDROM/TSCodecDTSHD.cs BDROM/TSCodecHEVC.cs BDROM/TSCodecLPCM.cs BDROM/TSCodecMPEG2.cs BDROM/TSCodecMVC.cs BDROM/TSCodecTrueHD.cs BDROM/TSInterleavedFile.cs BDROM/TSStreamBuffer.cs BDROM/TSStreamClipFile.cs BDROM/LanguageCodes.cs BDROM/TSStreamClip.cs BDROM/TSStreamFile.cs BDROM/TSPlaylistFile.cs BDROM/TSStream.cs BDROM/TSCodecVC1.cs FormPlaylist.cs FormPlaylist.Designer.cs ToolBox.cs FormChart.cs FormChart.Designer.cs FormMain.cs FormMain.Designer.cs FormReport.cs FormReport.Designer.cs FormSettings.cs FormSettings.Designer.cs Program.cs Options.cs Properties/AssemblyInfo.cs Properties/Resources.Designer.cs Properties/Settings.Designer.cs obj/Release/.NETFramework,Version=v4.5.AssemblyAttribute.cs /target:exe /win32icon:Resources/Toma4025-Rumax-Bluray-disc.ico /define:TRACE /nostdlib /reference:../packages/Discutils.0.11.0.2/lib/net40/DiscUtils.dll /reference:../packages/Discutils.0.11.0.2/lib/net40/DiscUtils.Common.dll /reference:../packages/Microsoft.WindowsAPICodePack-Core.1.1.0.2/lib/Microsoft.WindowsAPICodePack.dll /reference:../packages/Microsoft.WindowsAPICodePack-Shell.1.1.0.0/lib/Microsoft.WindowsAPICodePack.Shell.dll /reference:../packages/Microsoft.WindowsAPICodePack-Shell.1.1.0.0/lib/Microsoft.WindowsAPICodePack.ShellExtensions.dll /reference:/usr/lib/mono/4.5-api/System.dll /reference:/usr/lib/mono/4.5-api/System.Data.dll /reference:/usr/lib/mono/gac/System.Deployment/4.0.0.0__b03f5f7f11d50a3a/System.Deployment.dll /reference:/usr/lib/mono/4.5-api/System.Drawing.dll /reference:/usr/lib/mono/4.5-api/System.Windows.Forms.dll /reference:/usr/lib/mono/4.5-api/System.Xml.dll /reference:../packages/ZedGraph.5.1.7/lib/net35-Client/ZedGraph.dll /reference:/usr/lib/mono/4.5-api/System.Core.dll /reference:/usr/lib/mono/4.5-api//mscorlib.dll /warn:4 | |
BDROM/TSCodecAVC.cs(38,18): warning CS0219: The variable `constraintSet0Flag' is assigned but its value is never used | |
BDROM/TSCodecAVC.cs(39,18): warning CS0219: The variable `constraintSet1Flag' is assigned but its value is never used | |
BDROM/TSCodecAVC.cs(40,18): warning CS0219: The variable `constraintSet2Flag' is assigned but its value is never used | |
BDROM/BDROM.cs(684,26): warning CS0219: The variable `result' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(282,21): warning CS0219: The variable `dataLength' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(296,21): warning CS0219: The variable `extensionsOffset' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(307,21): warning CS0219: The variable `playlistLength' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(308,21): warning CS0219: The variable `playlistReserved' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(310,21): warning CS0219: The variable `subitemCount' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(318,28): warning CS0219: The variable `itemType' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(350,25): warning CS0219: The variable `condition' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(381,36): warning CS0219: The variable `angleType' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(425,25): warning CS0219: The variable `streamInfoLength' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(433,25): warning CS0219: The variable `streamCountPIP' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(584,17): warning CS0219: The variable `start' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(591,17): warning CS0219: The variable `subpathid' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(592,17): warning CS0219: The variable `subclipid' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(721,25): warning CS0219: The variable `code' is assigned but its value is never used | |
FormChart.cs(344,28): warning CS0219: The variable `frameType' is assigned but its value is never used | |
FormReport.cs(687,30): warning CS0219: The variable `clipOutSpan' is assigned but its value is never used | |
FormReport.cs(924,34): warning CS0219: The variable `chapterEndSpan' is assigned but its value is never used | |
BDROM/BDROM.cs(79,37): warning CS0414: The private field `BDInfo.BDROM.ExcludeDirs' is assigned but its value is never used | |
BDROM/TSCodecHEVC.cs(393,29): warning CS0414: The private field `BDInfo.TSCodecHEVC._chromaSampleLocTypeTopField' is assigned but its value is never used | |
BDROM/TSCodecHEVC.cs(394,29): warning CS0414: The private field `BDInfo.TSCodecHEVC._chromaSampleLocTypeBottomField' is assigned but its value is never used | |
Target _CopyAppConfigFile: | |
Copying file from '/home/user01/scripts/BDInfoCLI-ng/BDInfo/app.config' to '/home/user01/scripts/bdinfo/BDInfo.exe.config' | |
Target DeployOutputFiles: | |
Copying file from '/home/user01/scripts/BDInfoCLI-ng/BDInfo/obj/Release/BDInfo.exe.mdb' to '/home/user01/scripts/bdinfo/BDInfo.exe.mdb' | |
Copying file from '/home/user01/scripts/BDInfoCLI-ng/BDInfo/obj/Release/BDInfo.exe' to '/home/user01/scripts/bdinfo/BDInfo.exe' | |
Done building project "/home/user01/scripts/BDInfoCLI-ng/BDInfo/BDInfo.csproj". | |
Done building project "/home/user01/scripts/BDInfoCLI-ng/BDInfo.sln". | |
Build succeeded. | |
Warnings: | |
/home/user01/scripts/BDInfoCLI-ng/BDInfo.sln (default targets) -> | |
(Build target) -> | |
/home/user01/scripts/BDInfoCLI-ng/BDInfo/BDInfo.csproj (default targets) -> | |
/usr/lib/mono/xbuild/14.0/bin/Microsoft.CSharp.targets (CoreCompile target) -> | |
BDROM/TSCodecAVC.cs(38,18): warning CS0219: The variable `constraintSet0Flag' is assigned but its value is never used | |
BDROM/TSCodecAVC.cs(39,18): warning CS0219: The variable `constraintSet1Flag' is assigned but its value is never used | |
BDROM/TSCodecAVC.cs(40,18): warning CS0219: The variable `constraintSet2Flag' is assigned but its value is never used | |
BDROM/BDROM.cs(684,26): warning CS0219: The variable `result' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(282,21): warning CS0219: The variable `dataLength' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(296,21): warning CS0219: The variable `extensionsOffset' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(307,21): warning CS0219: The variable `playlistLength' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(308,21): warning CS0219: The variable `playlistReserved' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(310,21): warning CS0219: The variable `subitemCount' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(318,28): warning CS0219: The variable `itemType' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(350,25): warning CS0219: The variable `condition' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(381,36): warning CS0219: The variable `angleType' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(425,25): warning CS0219: The variable `streamInfoLength' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(433,25): warning CS0219: The variable `streamCountPIP' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(584,17): warning CS0219: The variable `start' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(591,17): warning CS0219: The variable `subpathid' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(592,17): warning CS0219: The variable `subclipid' is assigned but its value is never used | |
BDROM/TSPlaylistFile.cs(721,25): warning CS0219: The variable `code' is assigned but its value is never used | |
FormChart.cs(344,28): warning CS0219: The variable `frameType' is assigned but its value is never used | |
FormReport.cs(687,30): warning CS0219: The variable `clipOutSpan' is assigned but its value is never used | |
FormReport.cs(924,34): warning CS0219: The variable `chapterEndSpan' is assigned but its value is never used | |
BDROM/BDROM.cs(79,37): warning CS0414: The private field `BDInfo.BDROM.ExcludeDirs' is assigned but its value is never used | |
BDROM/TSCodecHEVC.cs(393,29): warning CS0414: The private field `BDInfo.TSCodecHEVC._chromaSampleLocTypeTopField' is assigned but its value is never used | |
BDROM/TSCodecHEVC.cs(394,29): warning CS0414: The private field `BDInfo.TSCodecHEVC._chromaSampleLocTypeBottomField' is assigned but its value is never used | |
24 Warning(s) | |
0 Error(s) | |
Time Elapsed 00:00:01.0073780 | |
root@box:~# user=$(whoami) | |
mkdir -p /home/$user/bdinfo | |
mono /home/$user/scripts/bdinfo/BDInfo.exe $1 /home/$user/bdinfo/ | |
Cannot open assembly '/home/root/scripts/bdinfo/BDInfo.exe': No such file or directory. | |
root@box:~# exit | |
logout | |
user01@box:~$ user=$(whoami) | |
mkdir -p /home/$user/bdinfo | |
mono /home/$user/scripts/bdinfo/BDInfo.exe $1 /home/$user/bdinfo/ | |
Please wait while we scan the disc... | |
Preparing to analyze the following: | |
File Elapsed Remaining | |
Scan completed successfully. | |
Please wait while we generate the report... | |
Object reference not set to an instance of an object |
sudo su -
bash <(curl -sL https://gist.github.com/brettpetch/58cd7c73537065942a7e78d3cb03022f/raw/6143fbd34f1e694251f37d015c2f17ac6e32c715/bdinfo-install.sh)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Changelog: bdinfo.sh changed to figure out user rather than doing %i calls (that don't work)