From 060477d7a73ac609dde8acf2d2f52aa1ab941c1b Mon Sep 17 00:00:00 2001 From: Lajos Meszaros Date: Wed, 9 Aug 2023 16:17:13 +0200 Subject: [PATCH] chore(scripts): remove scripts as they are no longer needed --- scripts/compile.sh | 74 ---------------------------------------------- scripts/dev.sh | 11 ------- scripts/pack.sh | 41 ------------------------- scripts/publish.sh | 13 -------- scripts/run.sh | 33 --------------------- 5 files changed, 172 deletions(-) delete mode 100755 scripts/compile.sh delete mode 100755 scripts/dev.sh delete mode 100755 scripts/pack.sh delete mode 100755 scripts/publish.sh delete mode 100755 scripts/run.sh diff --git a/scripts/compile.sh b/scripts/compile.sh deleted file mode 100755 index ef83a1d1..00000000 --- a/scripts/compile.sh +++ /dev/null @@ -1,74 +0,0 @@ -#!/bin/bash - -echo "" -echo "----------------------------" -echo " COMPILE" -echo "----------------------------" -echo "" - -REPO_ROOT="$(realpath $(dirname "$(realpath "${BASH_SOURCE:-$0}")")/../)/" - -# save already set environment variables to restore later (quasi dotenv_config_override=false) -CURRENT_ENV=$(declare -p -x) - -if [ -f "${REPO_ROOT}.env" ]; then - set -a - source "${REPO_ROOT}.env" - set +a -fi - -# restore previously saved environment variables -eval "$CURRENT_ENV" - -if [ "$LEVEL" = "" ]; then - LEVEL=1 -fi - -if [ -z "$OUTPUTDIR" ]; then - OUTPUTDIR=$(pwd)/generated/ -fi - -echo "output directory: $OUTPUTDIR" -echo "" - -arx-convert --version - -implode --version - -echo "" - -cd "${OUTPUTDIR}game/graph/levels/level$LEVEL" - -echo "" -echo "compiling FTS" - -cat fast.fts.json | arx-convert --from=json --to=fts > fast.fts.repacked -cat fast.fts.repacked | implode -b -l --offset=$(arx-header-size fast.fts.repacked --format=fts) --output=fast.fts --verbose -rm fast.fts.repacked - -cd "${OUTPUTDIR}graph/levels/level$LEVEL" - -echo "" -echo "compiling LLF" - -cat level$LEVEL.llf.json | arx-convert --from=json --to=llf | implode -b -l --offset=0 --output=level$LEVEL.llf --verbose - -echo "" -echo "compiling DLF" - -cat level$LEVEL.dlf.json | arx-convert --from=json --to=dlf > level$LEVEL.dlf.repacked -cat level$LEVEL.dlf.repacked | implode -b -l --offset=$(arx-header-size level$LEVEL.dlf.repacked --format=dlf) --output=level$LEVEL.dlf --verbose -rm level$LEVEL.dlf.repacked - -if [ "$CALCULATE_LIGHTING" == "1" ]; then - echo "" - echo "Fredlllll's lighting calculation" - - # DistanceAngle | DistanceAngleShadow | DistanceAngleShadowNoTransparency - LIGHTING_MODE="DistanceAngleShadowNoTransparency" - - ${REPO_ROOT}lib/fredlllll-lighting-calculator/linux/ArxLibertatisLightingCalculator --level "level${LEVEL}" --arx-data-dir "$OUTPUTDIR" --lighting-profile "$LIGHTING_MODE" -fi - -echo "" -echo "done" diff --git a/scripts/dev.sh b/scripts/dev.sh deleted file mode 100755 index 290fb59c..00000000 --- a/scripts/dev.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/bash - -set -e - -REPO_ROOT="$(realpath $(dirname "$(realpath "${BASH_SOURCE:-$0}")")/../)/" - -"${REPO_ROOT}scripts/generate.sh" - -"${REPO_ROOT}scripts/compile.sh" - -"${REPO_ROOT}scripts/run.sh" diff --git a/scripts/pack.sh b/scripts/pack.sh deleted file mode 100755 index f5bb0763..00000000 --- a/scripts/pack.sh +++ /dev/null @@ -1,41 +0,0 @@ -#!/bin/bash - -echo "" -echo "----------------------------" -echo " PACK" -echo "----------------------------" -echo "" - -REPO_ROOT="$(realpath $(dirname "$(realpath "${BASH_SOURCE:-$0}")")/../)/" - -# save already set environment variables to restore later (quasi dotenv_config_override=false) -CURRENT_ENV=$(declare -p -x) - -if [ -f "${REPO_ROOT}.env" ]; then - set -a - source "${REPO_ROOT}.env" - set +a -fi - -# restore previously saved environment variables -eval "$CURRENT_ENV" - -if [ "$LEVEL" = "" ]; then - LEVEL=1 -fi - -if [ -z "$OUTPUTDIR" ]; then - OUTPUTDIR=$(pwd)/generated/ -fi - -echo "" -echo "packing contents of \"${OUTPUTDIR}\" into \"${PROJECT}.zip\"" - -cd $OUTPUTDIR -zip -qr $PROJECT.zip ./* -sha256sum $PROJECT.zip | cut -f 1 -d " " > $PROJECT.zip.hash -# going back to the previous directory (quasi "cd -" without the pwd part) -cd $OLDPWD - -echo "" -echo "done" diff --git a/scripts/publish.sh b/scripts/publish.sh deleted file mode 100755 index fd7b67af..00000000 --- a/scripts/publish.sh +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/bash - -set -e - -REPO_ROOT="$(realpath $(dirname "$(realpath "${BASH_SOURCE:-$0}")")/../)/" - -export OUTPUTDIR="${REPO_ROOT}dist/" - -"${REPO_ROOT}scripts/generate.sh" - -"${REPO_ROOT}scripts/compile.sh" - -"${REPO_ROOT}scripts/pack.sh" diff --git a/scripts/run.sh b/scripts/run.sh deleted file mode 100755 index 1b24e328..00000000 --- a/scripts/run.sh +++ /dev/null @@ -1,33 +0,0 @@ -#!/bin/bash - -echo "" -echo "----------------------------" -echo " RUN" -echo "----------------------------" -echo "" - -REPO_ROOT="$(realpath $(dirname "$(realpath "${BASH_SOURCE:-$0}")")/../)/" - -if [ -f "${REPO_ROOT}.env" ]; then - set -a - source "${REPO_ROOT}.env" - set +a -fi - -if [ "$LEVEL" = "" ]; then - LEVEL=1 -fi - -if [ -z "$OUTPUTDIR" ]; then - OUTPUTDIR=$(pwd)/generated/ -fi - -# windows -if [ -e "${OUTPUTDIR}arx.exe" ]; then - $OUTPUTDIR/arx.exe --loadlevel $LEVEL -fi - -# linux -if [ -e "${OUTPUTDIR}arx" ]; then - $OUTPUTDIR/arx --loadlevel $LEVEL -fi