mirror of
https://github.com/prime31/FNA-VSCode-Template.git
synced 2025-10-31 21:50:44 +07:00
getFNA now only installs in its directory, not the directory it was called from
This commit is contained in:
parent
08b57d7fac
commit
b3c254aba3
15
getFNA.sh
15
getFNA.sh
@ -19,7 +19,7 @@ function downloadFNA()
|
|||||||
{
|
{
|
||||||
checkGit
|
checkGit
|
||||||
echo "Downloading FNA..."
|
echo "Downloading FNA..."
|
||||||
git clone https://github.com/FNA-XNA/FNA.git --recursive
|
git -C $MY_DIR clone https://github.com/FNA-XNA/FNA.git --recursive
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Finished downloading!"
|
echo "Finished downloading!"
|
||||||
else
|
else
|
||||||
@ -32,7 +32,7 @@ function updateFNA()
|
|||||||
{
|
{
|
||||||
checkGit
|
checkGit
|
||||||
echo "Updating to the latest git version of FNA..."
|
echo "Updating to the latest git version of FNA..."
|
||||||
git -C ./FNA pull --recurse-submodules
|
git -C "$MY_DIR/FNA" pull --recurse-submodules
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Finished updating!"
|
echo "Finished updating!"
|
||||||
else
|
else
|
||||||
@ -56,8 +56,8 @@ function getLibs()
|
|||||||
|
|
||||||
# Decompressing
|
# Decompressing
|
||||||
echo "Decompressing fnalibs..."
|
echo "Decompressing fnalibs..."
|
||||||
mkdir -p fnalibs
|
mkdir -p $MY_DIR/fnalibs
|
||||||
tar xjC fnalibs -f fnalibs.tar.bz2
|
tar xjC $MY_DIR/fnalibs -f fnalibs.tar.bz2
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
echo "Finished decompressing!"
|
echo "Finished decompressing!"
|
||||||
rm fnalibs.tar.bz2
|
rm fnalibs.tar.bz2
|
||||||
@ -67,8 +67,11 @@ function getLibs()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Get the directory of this script
|
||||||
|
MY_DIR=$(dirname "$BASH_SOURCE")
|
||||||
|
|
||||||
# FNA
|
# FNA
|
||||||
if [ ! -d "FNA" ]; then
|
if [ ! -d "$MY_DIR/FNA" ]; then
|
||||||
read -p "Download FNA (y/n)? " shouldDownload
|
read -p "Download FNA (y/n)? " shouldDownload
|
||||||
if [[ $shouldDownload =~ ^[Yy]$ ]]; then
|
if [[ $shouldDownload =~ ^[Yy]$ ]]; then
|
||||||
downloadFNA
|
downloadFNA
|
||||||
@ -81,7 +84,7 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# FNALIBS
|
# FNALIBS
|
||||||
if [ ! -d "fnalibs" ]; then
|
if [ ! -d "$MY_DIR/fnalibs" ]; then
|
||||||
read -p "Download fnalibs (y/n)? " shouldDownloadLibs
|
read -p "Download fnalibs (y/n)? " shouldDownloadLibs
|
||||||
else
|
else
|
||||||
read -p "Redownload fnalibs (y/n)? " shouldDownloadLibs
|
read -p "Redownload fnalibs (y/n)? " shouldDownloadLibs
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user