Fix scripts for linux

This commit is contained in:
Benjamin Rosseaux 2025-07-04 19:42:53 +02:00
commit 9737978397
21 changed files with 91 additions and 15 deletions

View file

@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail
cd src/tools/projectmanager
./makefpc
cd ../../..

View file

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
if [ ! -d "./externals" ]; then mkdir -p ./externals; fi
if [ ! -d "./externals/pasmp" ]; then ln -s ../../PASMP.github/trunk ./externals/pasmp; fi
if [ ! -d "./externals/pucu" ]; then ln -s ../../PUCU.github/trunk ./externals/pucu; fi

View file

@ -1,4 +1,5 @@
#!/bin/sh
#!/usr/bin/env bash
set -euo pipefail
read -p "Enter commit message (or leave blank for default): " commit_message

View file

@ -1,4 +1,5 @@
#!/bin/sh
#!/usr/bin/env bash
set -euo pipefail
git stash save
git pull
git stash drop

View file

@ -1,2 +1,3 @@
#/bin/sh
#!/usr/bin/env bash
set -euo pipefail
git submodule update --init --recursive

3
projects/examples/src/assets/compile Normal file → Executable file
View file

@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail
# Compile here your asset files and move the compiled files then to ../../assets/
cd shaders
./compileshaders

View file

@ -0,0 +1,19 @@
#!/bin/bash
set -euo pipefail
cd textoverlay
./compileshaders
cd ..
cd triangle
./compileshaders
cd ..
cd cube
./compileshaders
cd ..
cd dragon
./compileshaders
cd ..

View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
glslangValidator -V cube.vert -o cube_vert.spv
glslangValidator -V cube.frag -o cube_frag.spv
for f in *.spv; do
# spirv-opt --strip-debug --unify-const --flatten-decorations --eliminate-dead-const "$f" -o "$f"
spirv-opt --strip-debug --unify-const --flatten-decorations --eliminate-dead-const --strength-reduction --simplify-instructions --remove-duplicates -O "$f" -o "$f"
done
cp -f cube_vert.spv ../../../../assets/shaders/cube/cube_vert.spv
cp -f cube_frag.spv ../../../../assets/shaders/cube/cube_frag.spv
rm -f *.spv

View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
glslangValidator -V dragon.vert -o dragon_vert.spv
glslangValidator -V dragon.frag -o dragon_frag.spv
for f in *.spv; do
# spirv-opt --strip-debug --unify-const --flatten-decorations --eliminate-dead-const "$f" -o "$f"
spirv-opt --strip-debug --unify-const --flatten-decorations --eliminate-dead-const --strength-reduction --simplify-instructions --remove-duplicates -O "$f" -o "$f"
done
cp -f dragon_vert.spv ../../../../assets/shaders/dragon/dragon_vert.spv
cp -f dragon_frag.spv ../../../../assets/shaders/dragon/dragon_frag.spv
rm -f *.spv

View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
glslangValidator -V textoverlay.vert -o textoverlay_vert.spv
glslangValidator -V textoverlay.frag -o textoverlay_frag.spv
for f in *.spv; do
# spirv-opt --strip-debug --unify-const --flatten-decorations --eliminate-dead-const "$f" -o "$f"
spirv-opt --strip-debug --unify-const --flatten-decorations --eliminate-dead-const --strength-reduction --simplify-instructions --remove-duplicates -O "$f" -o "$f"
done
cp -f textoverlay_vert.spv ../../../../assets/shaders/textoverlay/textoverlay_vert.spv
cp -f textoverlay_frag.spv ../../../../assets/shaders/textoverlay/textoverlay_frag.spv
rm -f *.spv

View file

@ -0,0 +1,11 @@
#!/usr/bin/env bash
set -euo pipefail
glslangValidator -V triangle.vert -o triangle_vert.spv
glslangValidator -V triangle.frag -o triangle_frag.spv
for f in *.spv; do
# spirv-opt --strip-debug --unify-const --flatten-decorations --eliminate-dead-const "$f" -o "$f"
spirv-opt --strip-debug --unify-const --flatten-decorations --eliminate-dead-const --strength-reduction --simplify-instructions --remove-duplicates -O "$f" -o "$f"
done
cp -f triangle_vert.spv ../../../../assets/shaders/triangle/triangle_vert.spv
cp -f triangle_frag.spv ../../../../assets/shaders/triangle/triangle_frag.spv
rm -f *.spv

View file

@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail
# Check if the script is run from the root of the PasVulkan GIT repository by checking if the .git directory is present
if [ ! -d ".git" ]; then

View file

@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail
# Check if the script is run from the root of the PasVulkan GIT repository by checking if the .git directory is present
if [ ! -d ".git" ]; then

View file

@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail
# Check if the script is run from the root of the PasVulkan GIT repository by checking if the .git directory is present
if [ ! -d ".git" ]; then

View file

@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail
# Check if the script is run from the root of the PasVulkan GIT repository by checking if the .git directory is present
if [ ! -d ".git" ]; then

View file

@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail
# Check if the script is run from the root of the PasVulkan GIT repository by checking if the .git directory is present
if [ ! -d ".git" ]; then

3
setup
View file

@ -1,4 +1,5 @@
#!/bin/bash
#!/usr/bin/env bash
set -euo pipefail
if [ -d ".git" ]; then
./initsubmodules
else

View file

@ -1,5 +1,6 @@
#!/bin/sh
#!/usr/bin/env bash
set -euo pipefail
mkdir -p fpctemp
fpc -Sd -B -FEfpctemp -FUfpctemp -o../../../projectmanager projectmanager.dpr
rm -f fpctemp
rm -Rf fpctemp

View file

@ -1,3 +1,4 @@
#/bin/sh
#!/usr/bin/env bash
set -euo pipefail
git submodule update --remote --recursive