blob: 1c07b4be562b829ceaa7d00d36b8263212956666 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
#!/bin/bash
source /etc/make.conf
USER="tampakrap"
GROUP="tampakrap"
GIT="/usr/bin/git"
if [[ $1 == 'clone' ]]; then
# KDE Repos
if [[ $2 == "git://anongit.kde.org/"* ]] && [[ $KDE_DEVELOPER == 1 ]]; then
KDE_REPO=$(echo $2 | sed 's:git\://anongit.kde.org/::')
$GIT "$@"
chown -R $USER:$USER $DISTDIR/egit-src/$KDE_REPO
# Gentoo Repos
elif [[ $2 == "git://git.overlays.gentoo.org/"* ]] && [[ $GENTOO_DEVELOPER == 1 ]];then
GENTOO_REPO=$(echo $2 | sed 's:git\://git.overlays.gentoo.org/::')
$GIT "$@"
chown -R $USER:$GROUP $DISTDIR/egit-src/$GENTOO_REPO
else
$GIT "$@"
fi
else
if [[ ${PWD%/*} == $DISTDIR/egit-src ]] && ( grep -s -q gentoo .git/config || grep -s -q kde .git/config ); then
sudo -u $USER $GIT "$@"
else
$GIT "$@"
fi
fi
|