mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-13 14:32:28 +03:00
git pre-commit hooks are always run from the root
No need to find out the basedir. We don't do it for the python tests anyway.
This commit is contained in:
parent
2e56f4ecbf
commit
92a4bacbf6
1 changed files with 1 additions and 8 deletions
|
@ -37,16 +37,9 @@ fi
|
||||||
#------------------------------------------------------------------------------#
|
#------------------------------------------------------------------------------#
|
||||||
# check the syntax of included shell scripts
|
# check the syntax of included shell scripts
|
||||||
|
|
||||||
basedir=`cd $(dirname $0)/.. && pwd`
|
|
||||||
echo basedir: $basedir
|
|
||||||
|
|
||||||
if [ $(basename $basedir) = ".git" ]; then
|
|
||||||
basedir=$(dirname $basedir)
|
|
||||||
fi
|
|
||||||
|
|
||||||
exitstatus=0
|
exitstatus=0
|
||||||
# use bash to check that the syntax is correct
|
# use bash to check that the syntax is correct
|
||||||
for f in $basedir/fd-commit $basedir/jenkins-build $basedir/docs/*.sh $basedir/hooks/pre-commit; do
|
for f in fd-commit jenkins-build docs/*.sh hooks/pre-commit; do
|
||||||
if bash -n $f; then
|
if bash -n $f; then
|
||||||
: # success! do nothing
|
: # success! do nothing
|
||||||
else
|
else
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue