summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xmips64el/mipsrelease5
-rwxr-xr-xtreepkg18
2 files changed, 17 insertions, 6 deletions
diff --git a/mips64el/mipsrelease b/mips64el/mipsrelease
index e1035aa..0d14c72 100755
--- a/mips64el/mipsrelease
+++ b/mips64el/mipsrelease
@@ -48,6 +48,9 @@ done
repo-add ${PKGDEST}/stage3.db.tar.gz ${pkgs[@]}
+sudo pacman -Sy
+librestage ${repo}
+
mkdir -p ${WORKDIR}/abs/${CARCH}/${repo} >/dev/null
@@ -57,6 +60,4 @@ popd >/dev/null
$libretoolsdir/chcleanup || true
-sudo pacman -Sy
-
exit $?
diff --git a/treepkg b/treepkg
index 376af91..167ccbd 100755
--- a/treepkg
+++ b/treepkg
@@ -1,9 +1,12 @@
#!/bin/bash
#set -x
source /etc/libretools.conf
-source $(dirname $0)/libremessages
source $XDG_CONFIG_HOME/libretools/libretools.conf >/dev/null 2>&1|| true
+# Get system variables
+source /etc/makepkg.conf
+source $HOME/makepkg.conf >/dev/null 2>&1|| true
+
# End inmediately but print a useful message
trap_exit() {
error "($(basename $0)) $@"
@@ -32,7 +35,7 @@ get_fullver() {
# $1 status
# $2 pkgname
add_order() {
- echo "${1};${DEPTH};${2:-${pkgbase}};${fullver};${PWD}" >> "${BUILDORDER}"
+ echo "${1};${DEPTH};${2:-${pkgbase}};${fullver};${PWD};$(guess_repo "$PWD")" >> "${BUILDORDER}"
${VERBOSE} && msg2 "%${DEPTH}s${2:-${pkgbase}} [${1}]" || true
}
@@ -44,8 +47,14 @@ where_is() {
cut -d: -f2 2>/dev/null
}
+# Guess the repo from the pkgbase path
+# $1 path, pwd or where_is
+guess_repo() {
+ basename "$(dirname "${1}")"
+}
+
if [ ! -f PKGBUILD ]; then
- error "Missing PKGBUILD"
+ error "Missing PKGBUILD ($PWD)"
exit 1
fi
@@ -148,7 +157,8 @@ if [ ${DEPTH} -eq 0 ]; then
# Run build command
pushd "${BUILDDIR}/${_pkg}" >/dev/null
${FULLBUILDCMD}
- ${HOOKLOCALRELEASE}
+# Run local release hook with $1 = $repo
+ ${HOOKLOCALRELEASE} $(egrep ";${_pkg};" "${BUILDORDER}" | cut -d';' -f6)
popd >/dev/null
done