Skip to content

Commit

Permalink
Make use of more subshells & computed hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
Mrcubix committed Mar 22, 2024
1 parent 9b2efa3 commit 1f9ea8c
Showing 1 changed file with 64 additions and 3 deletions.
67 changes: 64 additions & 3 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,26 @@ else
exit 1
fi

# Do a final cleanup, remove all OpenTabletDriver*.pdb files

find ./build/UX -name "OpenTabletDriver*.pdb" -type f -delete

# zip all the files

(
cd ./build/UX

for f in *; do
if [ -d "$f" ]; then
echo "Zipping $f"
(
cd "$f"
zip -r "../Wheel-Addon.UX-$f.zip" *
)
fi
done
)

echo ""
echo "Building Installer"
echo ""
Expand All @@ -74,9 +94,11 @@ else
exit 1
fi

mkdir ./build/installer/

rm -rf ./build/installer/*
if [ ! -d "./build/installer" ]; then
mkdir ./build/installer/
else
rm -rf ./build/installer/*
fi

mv ./temp/installer/Wheel-Addon.Installer.dll ./build/installer/Wheel-Addon.Installer.dll

Expand All @@ -86,6 +108,45 @@ zip -r ./build/installer/Wheel-Addon.Installer.zip ./build/installer/*

rm -rf ./temp

echo ""
echo "Computing Hashes"
echo ""

# Append all hashes to hashes.txt
(
cd ./build

output="../hashes.txt"

(
cd ./plugin

# Compute Plugin Hash
sha256sum Wheel-Addon.zip > $output
)

echo "" >> hashes.txt

(
cd ./UX

# Compute all UX Hashes

for os in win linux osx; do
for arch in x64 x86 arm64; do

name="Wheel-Addon.UX-$os-$arch.zip"

echo "Computing $name"

if [ -f "$name" ]; then
sha256sum $name >> $output
fi
done
done
)
)

echo ""
echo "Done"
echo ""

0 comments on commit 1f9ea8c

Please sign in to comment.