Skip to content
Snippets Groups Projects

Resolve "Automatische Generierung von cmake-Files für Projekte"

1 file
+ 23
3
Compare changes
  • Side-by-side
  • Inline
+ 23
3
@@ -8,8 +8,24 @@ if [ $# -lt 1 ]; then
exit
fi
PROJECT=$1
RUN_WITH_HUD="no"
BUILD_FLAGS=""
while [ $# -gt 1 ]; do
case "$1" in
"--"*)
if [ "$1" = "--hud" ]; then
RUN_WITH_HUD="yes"
else
BUILD_FLAGS="$BUILD_FLAGS$1 "
fi
shift 1;;
*) break;;
esac
done
PROJECT="$1"
PROJECT_DIR="../projects/$PROJECT"
shift 1
# Check if the project name is valid
if [ ! -d "$PROJECT_DIR" ]; then
@@ -17,7 +33,7 @@ if [ ! -d "$PROJECT_DIR" ]; then
exit
fi
./build.sh $PROJECT
./build.sh $FLAGS "$PROJECT"
cd "$PROJECT_DIR" || exit
if [ ! -f "$PROJECT" ]; then
@@ -25,4 +41,8 @@ if [ ! -f "$PROJECT" ]; then
exit
fi
./$PROJECT
\ No newline at end of file
if [ "$RUN_WITH_HUD" = "yes" ]; then
MANGOHUD=1 ./"$PROJECT" "$@"
else
./"$PROJECT" "$@"
fi
\ No newline at end of file
Loading