Skip to content

Commit

Permalink
Copying setup_and_build scripts from TextUR.
Browse files Browse the repository at this point in the history
  • Loading branch information
razterizer committed Dec 12, 2024
1 parent 1202d16 commit 9eb5354
Show file tree
Hide file tree
Showing 2 changed files with 67 additions and 0 deletions.
34 changes: 34 additions & 0 deletions setup_and_build.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
@echo off

set REPO_DIR=TextUR

REM Change directory
cd ..

REM Run the dependency fetch script
python "%REPO_DIR%\fetch-dependencies.py" "%REPO_DIR%\dependencies"

REM Navigate to the appropriate directory
cd "%REPO_DIR%\%REPO_DIR%"

REM Run the build script
call build.bat

:askUser
REM Ask the user if they want to run the program
set /p response=Do you want to run the program? (yes/no):

REM Process the response
if /i "%response%"=="yes" (
echo Running the program...
call run.bat
goto end
) else if /i "%response%"=="no" (
echo Alright. Have a nice day!
goto end
) else (
echo Invalid response. Please answer yes or no.
goto askUser
)

:end
33 changes: 33 additions & 0 deletions setup_and_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/bin/bash

REPO_DIR="TextUR"

cd ..

./"${REPO_DIR}"/fetch-dependencies.py "${REPO_DIR}"/dependencies

cd "${REPO_DIR}/${REPO_DIR}"

./build.sh

while true; do
# Ask the user
read -p "Do you want to run the program? (yes/no): " response

# Process the response
case "$response" in
yes|y|Y|YES|Yes)
echo "Running the program..."
./run.sh
break
;;
no|n|N|NO|No)
echo "Alright. Have a nice day!"
break
;;
*)
echo "Invalid response. Please answer yes or no."
;;
esac
done

0 comments on commit 9eb5354

Please sign in to comment.