git://git.novaco.in
/
novacoin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
21daf2e
)
Fix genbuild.sh to allow configuring building outside of project root
author
user
<balthazar@yandex.ru>
Wed, 29 Dec 2021 05:18:45 +0000 (08:18 +0300)
committer
user
<balthazar@yandex.ru>
Wed, 29 Dec 2021 05:18:45 +0000 (08:18 +0300)
share/genbuild.sh
patch
|
blob
|
history
diff --git
a/share/genbuild.sh
b/share/genbuild.sh
index
d959877
..
8af3f1f
100755
(executable)
--- a/
share/genbuild.sh
+++ b/
share/genbuild.sh
@@
-1,5
+1,9
@@
#!/bin/sh
+PREVDIR=$(pwd)
+SCRIPT=$(readlink -f $0)
+SCRIPTPATH=`dirname $SCRIPT`
+
if [ $# -gt 0 ]; then
FILE="$1"
shift
@@
-11,6
+15,8
@@
else
exit 1
fi
+cd $SCRIPTPATH
+
if [ -e "$(which git)" ]; then
# clean 'dirty' status of touched files that haven't been modified
git diff >/dev/null 2>/dev/null
@@
-33,3
+39,5
@@
if [ "$INFO" != "$NEWINFO" ]; then
echo "$NEWINFO" >"$FILE"
echo "#define BUILD_DATE \"$TIME\"" >>"$FILE"
fi
+
+cd $PREVDIR