Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion gitreceive
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#!/bin/bash

readonly GITUSER="${GITUSER:-git}"
readonly GITHOME="/home/$GITUSER"

if [ -z "$(getent passwd ${GITUSER})" ]; then
readonly GITHOME="/home/${GITUSER}"
else
readonly GITHOME="$(getent passwd ${GITUSER} | cut -d: -f6)"
fi

# Given a relative path, calculate the absolute path
absolute_path() {
Expand Down