-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copying setup_and_build scripts from TextUR.
- Loading branch information
1 parent
1202d16
commit 9eb5354
Showing
2 changed files
with
67 additions
and
0 deletions.
There are no files selected for viewing
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
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 |
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
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 | ||
|