Solved 'git rev-parse HEAD' error

"rev=\$(cd /home/adhocracy/adhocracy && git rev-parse HEAD)" throws an error, that the directory   adhocracy cannot be found. Fixing this throws the error, that the directory is not a git repository.

Solved this by setting rev='git rev-parse HEAD' at the beginning of the script. It is not the nicest way, but it works.