mirror of
https://github.com/pygos/build.git
synced 2024-11-22 19:19:46 +01:00
Merge run_pkg_command functions
Signed-off-by: David Oberhollenzer <david.oberhollenzer@tele2.at>
This commit is contained in:
parent
015cb894cd
commit
df68358afd
2 changed files with 8 additions and 16 deletions
8
mk.sh
8
mk.sh
|
@ -61,8 +61,8 @@ gen_cmake_toolchain_file
|
|||
|
||||
while read pkg; do
|
||||
include_pkg "tcpkg" "$pkg"
|
||||
run_tcpkg_command "build"
|
||||
run_tcpkg_command "deploy"
|
||||
run_pkg_command "build" "toolchain"
|
||||
run_pkg_command "deploy" "toolchain"
|
||||
done < "$PACKAGELIST"
|
||||
|
||||
echo "--- backing up toolchain sysroot ---"
|
||||
|
@ -90,8 +90,8 @@ while read pkg; do
|
|||
|
||||
install_build_deps
|
||||
|
||||
run_pkg_command "build"
|
||||
run_pkg_command "deploy"
|
||||
run_pkg_command "build" "$PKGNAME"
|
||||
run_pkg_command "deploy" "$PKGNAME"
|
||||
|
||||
restore_toolchain
|
||||
done < "$PACKAGELIST"
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
run_pkg_command_common() {
|
||||
run_pkg_command() {
|
||||
local FUNCTION="$1"
|
||||
local DEPLOYDIR="$PKGDEPLOYDIR/$2"
|
||||
local OUT="$PKGBUILDDIR/$3"
|
||||
local CHECKFILE="$PKGLOGDIR/.${4}-${FUNCTION}"
|
||||
local OUT="$PKGBUILDDIR/${PKGDIR}-${PKGNAME}"
|
||||
local CHECKFILE="$PKGLOGDIR/.${PKGDIR}-${PKGNAME}-${FUNCTION}"
|
||||
|
||||
echo "$PKGNAME - $FUNCTION"
|
||||
|
||||
|
@ -10,7 +10,7 @@ run_pkg_command_common() {
|
|||
return
|
||||
fi
|
||||
|
||||
local LOGFILE="$PKGLOGDIR/${5}-${FUNCTION}.log"
|
||||
local LOGFILE="$PKGLOGDIR/${PKGDIR}-${PKGNAME}-${FUNCTION}.log"
|
||||
local SRC="$PKGSRCDIR/$SRCDIR"
|
||||
|
||||
mkdir -p "$DEPLOYDIR" "$OUT" "${DEPLOYDIR}-dev"
|
||||
|
@ -25,11 +25,3 @@ run_pkg_command_common() {
|
|||
|
||||
touch "$CHECKFILE"
|
||||
}
|
||||
|
||||
run_pkg_command() {
|
||||
run_pkg_command_common "$1" "$PKGNAME" "$PKGNAME" "$PKGNAME" "$PKGNAME"
|
||||
}
|
||||
|
||||
run_tcpkg_command() {
|
||||
run_pkg_command_common "$1" "toolchain" "tc-$PKGNAME" "tc-$PKGNAME" "tc-$PKGNAME"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue