git: include new git ports driver
This commit is contained in:
parent
c01b6d56f5
commit
bd86ca2544
@ -1,3 +1,7 @@
|
||||
drwxr-xr-x root/root etc/
|
||||
drwxr-xr-x root/root etc/ports/
|
||||
drwxr-xr-x root/root etc/ports/drivers/
|
||||
-rwxr-xr-x root/root etc/ports/drivers/git
|
||||
drwxr-xr-x root/root usr/
|
||||
drwxr-xr-x root/root usr/bin/
|
||||
-rwxr-xr-x root/root usr/bin/git
|
||||
|
@ -1,2 +1,3 @@
|
||||
3a41bf84bbc6d20bc537d99b972b815f git
|
||||
43e01f9d96ba8c11611e0eef0d9f9f28 git-2.2.1.tar.xz
|
||||
d9851260c085d4161a73c9441484a95e git-manpages-2.2.1.tar.xz
|
||||
|
@ -8,7 +8,8 @@
|
||||
name=git
|
||||
version=2.2.1
|
||||
release=1
|
||||
source=(https://www.kernel.org/pub/software/scm/git/git-{,manpages-}$version.tar.xz)
|
||||
source=(https://www.kernel.org/pub/software/scm/git/git-{,manpages-}$version.tar.xz
|
||||
git)
|
||||
|
||||
build() {
|
||||
cd $name-$version
|
||||
@ -29,4 +30,9 @@ build() {
|
||||
|
||||
find $PKG \( -name perllocal.pod -o -name .packlist \) -delete
|
||||
rm -rf $PKG/usr/share/{locale,gitk}
|
||||
|
||||
# install the git ports driver
|
||||
install -m 755 -d $PKG/etc/ports/drivers
|
||||
install -m 755 $SRC/git $PKG/etc/ports/drivers/git
|
||||
|
||||
}
|
||||
|
37
git/git
Normal file
37
git/git
Normal file
@ -0,0 +1,37 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
# /etc/ports/drivers/git: git driver script for ports(8)
|
||||
#
|
||||
|
||||
if [ $# -ne 1 ]; then
|
||||
echo "usage: $0 <file>" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
. $1
|
||||
|
||||
if [ -z "$URL" ]; then
|
||||
echo "URL not set in '$1'" >&2
|
||||
exit 2
|
||||
fi
|
||||
if [ -z "$NAME" ]; then
|
||||
echo "NAME not set in '$1'" >&2
|
||||
exit 2
|
||||
fi
|
||||
|
||||
echo "Fetching updates from $URL"
|
||||
echo "Updating collection $NAME"
|
||||
|
||||
cd "$PORTS_DIR/$NAME" 2> "/dev/null"
|
||||
|
||||
if [ $? -lt 1 ]; then
|
||||
git fetch -q
|
||||
git diff --pretty=format: --name-status $BRANCH origin/$BRANCH | sed "s/M\t/ Edit /g; s/A\t/ Checkout /g; s/D\t/ Delete /g" | sort
|
||||
git clean -q -f
|
||||
git reset -q --hard origin/$BRANCH
|
||||
else
|
||||
echo " Initial git clone, this may take a while"
|
||||
git clone -q "$URL" "$PORTS_DIR/$NAME"
|
||||
fi
|
||||
|
||||
echo "Finished successfully"
|
Loading…
x
Reference in New Issue
Block a user