summaryrefslogtreecommitdiff
path: root/abuild.in
diff options
context:
space:
mode:
Diffstat (limited to 'abuild.in')
-rwxr-xr-xabuild.in17
1 files changed, 9 insertions, 8 deletions
diff --git a/abuild.in b/abuild.in
index 14c2762..aebcd25 100755
--- a/abuild.in
+++ b/abuild.in
@@ -20,7 +20,8 @@ abuild_path=$(readlink -f $0)
BUILD_BASE="build-base"
FAKEROOT=${FAKEROOT:-"fakeroot"}
-: ${APK:=abuild-apk}
+: ${SUDO_APK:=abuild-apk}
+: ${APK:=apk}
: ${ADDUSER:=abuild-adduser}
: ${ADDGROUP:=abuild-addgroup}
@@ -103,7 +104,7 @@ cleanup() {
set_xterm_title ""
if [ -z "$install_after" ] && [ -n "$uninstall_after" ]; then
msg "Uninstalling dependencies..."
- $APK del --quiet $apk_opt_wait $uninstall_after
+ $SUDO_APK del --quiet $apk_opt_wait $uninstall_after
fi
if [ -n "$CLEANUP_FILES" ]; then
rm -f $CLEANUP_FILES
@@ -1292,10 +1293,10 @@ builddeps() {
if [ -n "$install_deps" ] && [ -z "$recursive" ] && [ -n "$deps" ]; then
# make a --simluate run first to detect missing deps
# apk-tools --virtual is no goot at reporting those.
- $APK add --repository "$abuildrepo" \
+ $SUDO_APK add --repository "$abuildrepo" \
$apk_opt_wait \
--simulate --quiet $deps || return 1
- $APK add --repository "$abuildrepo" \
+ $SUDO_APK add --repository "$abuildrepo" \
$apk_opt_wait \
--virtual .makedepends-$pkgname $deps \
&& return 0
@@ -1327,7 +1328,7 @@ builddeps() {
cd "$dir" && $0 $forceroot $keep $quiet $install_deps \
$recursive $upgrade $color_opt abuildindex || return 1
done
- $APK add -u --repository "$abuildrepo" \
+ $SUDO_APK add -u --repository "$abuildrepo" \
$apk_opt_wait \
--virtual .makedepends-$pkgname $deps
}
@@ -1442,18 +1443,18 @@ post_add() {
post_add $i || return 1
fi
done
- $APK add $apk_opt_wait -u "$pkgf" || die "Failed to install $1"
+ $SUDO_APK add $apk_opt_wait -u "$pkgf" || die "Failed to install $1"
}
installdeps() {
local deps i
- $APK add $apk_opt_wait --repository "$abuildrepo" \
+ $SUDO_APK add $apk_opt_wait --repository "$abuildrepo" \
--virtual .makedepends-$pkgname \
$makedepends
}
uninstalldeps (){
- $APK del $apk_opt_wait .makedepends-$pkgname
+ $SUDO_APK del $apk_opt_wait .makedepends-$pkgname
}
all() {