mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-05-19 00:20:23 -07: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,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…
x
Reference in New Issue
Block a user