Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions ubuntuAutoInstall.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
USER="ubuntu" #your username
HOME="/home/$USER"
INSTALL_DIR_OMNISHARPSERVER="$HOME"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't $HOME already a predefined environment variable on Ubuntu?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah $HOME is predefined environment variable, but still it's always safer to redefine all the variables, in order to avoid any discrepancy..

OMNISHARP_WORKSPACE="$HOME/omnisharp_workspace"

#install mono in /opt/monodevelop
sudo add-apt-repository -y ppa:ermshiperete/monodevelop
sudo apt-get update
sudo apt-get -y install monodevelop-current

#Install Omnisharp
git -C $INSTALL_DIR_OMNISHARPSERVER clone https://github.com/nosami/OmniSharpServer.git
git -C $INSTALL_DIR_OMNISHARPSERVER/OmniSharpServer submodule update --init --recursive
/opt/monodevelop/bin/xbuild $INSTALL_DIR_OMNISHARPSERVER/OmniSharpServer/OmniSharp.sln

#make csharp workspace
#mkdir $OMNISHARP_WORKSPACE
#mkdir $OMNISHARP_WORKSPACE/csharp

#start the Omnisharp server on the created workspace
#-p is for port number
#-s is for the workspace directory name
#/opt/monodevelop/bin/mono $INSTALL_DIR_OMNISHARPSERVER/OmniSharpServer/OmniSharp/bin/Debug/OmniSharp.exe -v Verbose -s $OMNISHARP_WORKSPACE/csharp -p 2000