summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
Diffstat (limited to 'abuild.in')
-rw-r--r--abuild.in21
1 files changed, 10 insertions, 11 deletions
diff --git a/abuild.in b/abuild.in
index 6c548fb..b32105b 100644
--- a/abuild.in
+++ b/abuild.in
@@ -12,7 +12,6 @@ sysconfdir=@sysconfdir@
datadir=@datadir@
abuild_path=$(readlink -f $0)
-git=$(command -v git) || git=true
if ! [ -f "$datadir/functions.sh" ]; then
echo "$datadir/functions.sh: not found" >&2
@@ -818,12 +817,12 @@ prepare_language_packs() {
# echo '-dirty' if git is not clean
git_dirty() {
- [ $($git status -s "$startdir" | wc -l) -ne 0 ] && echo "-dirty"
+ [ $($ABUILD_GIT status -s "$startdir" | wc -l) -ne 0 ] && echo "-dirty"
}
# echo last commit hash id
git_last_commit() {
- $git log --format=oneline -n 1 "$startdir" | awk '{print $1}'
+ $ABUILD_GIT log --format=oneline -n 1 "$startdir" | awk '{print $1}'
}
get_maintainer() {
@@ -1565,7 +1564,7 @@ update_abuildrepo_index() {
subpkg_unset
if [ -z "$DESCRIPTION" ]; then
- DESCRIPTION="$repo $(cd $startdir && $git describe 2>/dev/null || true)"
+ DESCRIPTION="$repo $(cd $startdir && $ABUILD_GIT describe 2>/dev/null || true)"
fi
for i in $allarch; do
@@ -2201,7 +2200,7 @@ rootbld() {
fi
local version="edge" buildhost="edge" gitref
- if gitref="$(expr "$(git symbolic-ref --short HEAD)" : '\([0-9]\+\(\.[0-9]\+\)*\)-')"; then
+ if gitref="$(expr "$($ABUILD_GIT symbolic-ref --short HEAD)" : '\([0-9]\+\(\.[0-9]\+\)*\)-')"; then
version=v${gitref}
buildhost="$(printf '%s' "$gitref" | sed 's/[.]/-/')"
fi
@@ -2209,10 +2208,10 @@ rootbld() {
local repo_template="$aportsgit/$repo/.rootbld-repositories"
[ -s "$repo_template" ] || die "rootbld: $repo_template does not exist"
(
- for key in $(git config --list --name-only); do
+ for key in $($ABUILD_GIT config --list --name-only); do
k=${key#abuild.}
[ $k != $key ] && \
- eval "export $k=\"$(git config --get $key)\""
+ eval "export $k=\"$($ABUILD_GIT config --get $key)\""
done
export mirror version
@@ -2424,12 +2423,12 @@ snapshot() {
# clone git repo and archive
if [ -n "$giturl" ]; then
local _version="${verbase:-0}_git${_date}"
- [ "$git" = "true" ] && die "Missing git! Install git to support git clone."
+ [ "$ABUILD_GIT" = "true" ] && die "Missing git! Install git to support git clone."
local _rev="${reporev:-HEAD}"
[ "$_rev" = "HEAD" ] && local _depth="--depth=1"
msg "Creating git snapshot: $pkgname-$_version"
- git clone $_depth --bare $giturl $pkgname-$_version || return 1
- git --git-dir $pkgname-$_version archive \
+ $ABUILD_GIT clone $_depth --bare $giturl $pkgname-$_version || return 1
+ $ABUILD_GIT --git-dir $pkgname-$_version archive \
--format=$_format \
-o $pkgname-$_version.$_format \
--prefix=$pkgname-$_version/ $_rev \
@@ -2468,7 +2467,7 @@ usage() {
-A Print CARCH and exit
-c Enable colored output
-d Disable dependency checking
- -D Set APKINDEX description (default: \$repo \$(git describe))
+ -D Set APKINDEX description (default: \$repo \$(\$ABUILD_GIT describe))
-f Force specified cmd (skip checks: apk up to date, arch, libc)
-F Force run as root
-h Show this help