github.com/freiheit-com/kuberpult@v1.24.2-0.20240328135542-315d5630abe6/infrastructure/docker/git-ssh/fix-repos.sh (about)

     1  #!/bin/sh
     2  
     3  PUSR=git
     4  PHOME=/${PUSR}
     5  PREPOS=${PHOME}/repos
     6  
     7  # If Git repositories are present, fix permissions and set `SGID` bits
     8  if [ -n "$(ls -A ${PREPOS}/)" ]; then
     9      chown -R ${PUSR}:${PUSR} ${PREPOS}/
    10      chmod -R ug+rwX ${PREPOS}/
    11      find ${PREPOS}/ -type d -exec chmod g+s '{}' +
    12  fi