From c79ac15ab1c42b5c16671437b7b8917dcf64bbbf Mon Sep 17 00:00:00 2001 From: Evan Hemsley Date: Sat, 11 Jul 2020 14:20:10 -0700 Subject: [PATCH] fix core reference + install script tidying --- ProjectName/ProjectName.Core.csproj | 1 + install.sh | 24 +++++++++++++++++++----- 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/ProjectName/ProjectName.Core.csproj b/ProjectName/ProjectName.Core.csproj index e2b8be4..a93b6ab 100644 --- a/ProjectName/ProjectName.Core.csproj +++ b/ProjectName/ProjectName.Core.csproj @@ -24,6 +24,7 @@ + diff --git a/install.sh b/install.sh index a554ba0..993846a 100755 --- a/install.sh +++ b/install.sh @@ -7,6 +7,9 @@ # Get the directory of this script MY_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" +FNA_VERSION=20.07 +ENCOMPASS_VERSION=0.21.1 + readlinkf(){ perl -MCwd -e 'print Cwd::abs_path shift' "$1";} # Checks if git is installed @@ -19,12 +22,15 @@ function checkGit() fi } -# Pulls FNA from the git master branch +# Pulls FNA from github function pullFNA() { checkGit git submodule add https://github.com/FNA-XNA/FNA.git - echo "Updating to the latest git version of FNA..." + cd FNA + git checkout $FNA_VERSION + cd .. + echo "Updating to the latest version of FNA..." git submodule update --init --recursive if [ $? -eq 0 ]; then echo "Finished updating!" @@ -34,12 +40,15 @@ function pullFNA() fi } -# Pulls Encompass from git +# Pulls Encompass from gitea function pullEncompass() { checkGit - echo "Updating to latest git version of Encompass..." + echo "Updating to latest version of Encompass..." git submodule add https://gitea.moonside.games/MoonsideGames/encompass-cs.git + cd encompass-cs + git checkout $ENCOMPASS_VERSION + cd .. if [ $? -eq 0 ]; then echo "Finished updating!" else @@ -108,4 +117,9 @@ pullFNA pullEncompass echo "Project $newProjectName created at: " -echo $(readlinkf $NEW_PROJECT_DIR) + +if [ "$(uname)" == "Darwin" ]; then + echo $(readlinkf $NEW_PROJECT_DIR) +else + echo $(readlink -f $NEW_PROJECT_DIR) +fi