mirror of
https://github.com/hyprwm/Hyprland
synced 2025-12-20 05:30:04 +01:00
scripts: don't overwrite generated version if we're not in a git repo
This commit is contained in:
parent
64591c85aa
commit
8a6778f0a0
1 changed files with 9 additions and 0 deletions
|
|
@ -1,4 +1,13 @@
|
|||
#!/bin/sh
|
||||
|
||||
# if the git directory doesn't exist, don't gather data to avoid overwriting, unless
|
||||
# the version file is missing altogether (otherwise compiling will fail)
|
||||
if [[ ! -d ./.git ]]; then
|
||||
if [[ -f ./src/version.h ]]; then
|
||||
exit 0
|
||||
fi
|
||||
fi
|
||||
|
||||
cp -fr ./src/version.h.in ./src/version.h
|
||||
|
||||
HASH=${HASH-$(git rev-parse HEAD)}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue