Check if we are in the git repo (or perhaps in a tarball)

This commit is contained in:
David Guillen Fandos
2025-07-06 10:28:22 +02:00
parent 4ec0eef96f
commit 3cec824246

View File

@@ -45,8 +45,11 @@ mkdir -p $PSPDEV/share/licenses/PrxEncrypter
cp tools/PrxEncrypter/LICENSE $PSPDEV/share/licenses/PrxEncrypter
## Store build information
BUILD_FILE="${PSPDEV}/build.txt"
if [[ -f "${BUILD_FILE}" ]]; then
if [ -d .git ]; then
BUILD_FILE="${PSPDEV}/build.txt"
if [[ -f "${BUILD_FILE}" ]]; then
sed -i'' '/^pspsdk /d' "${BUILD_FILE}"
fi
git log -1 --format="pspsdk %H %cs %s" >> "${BUILD_FILE}"
fi
git log -1 --format="pspsdk %H %cs %s" >> "${BUILD_FILE}"