Commit 7a68c8d2 authored by Bernhard Landauer's avatar Bernhard Landauer

fix #28

parent 1aad2118
......@@ -3,6 +3,7 @@
# Set globals
LIBDIR=/usr/share/manjaro-arm-tools/lib
BUILDCLEAN=true
INSTALL_NEW=false
#imports
source $LIBDIR/functions.sh
......@@ -33,6 +34,9 @@ while getopts "${opt}" arg; do
i)
ADD_PACKAGE="${OPTARG}"
;;
n)
INSTALL_NEW=true
;;
\?)
echo "Invalid option: -${OPTARG}"
exit 1
......
......@@ -48,6 +48,7 @@ usage_build_pkg() {
echo " -p <pkg> Package to build"
echo " -k Keep the previous rootfs for this build"
echo " -b <branch> Set the branch used for the build. [Default = arm-stable. Options = arm-stable, arm-testing or arm-unstable]"
echo " -n Install built package into rootfs"
echo " -i <package> Install local package into rootfs."
echo ' -h This help'
echo ''
......@@ -543,7 +544,11 @@ build_pkg() {
msg "Building {$PACKAGE}..."
mount -o bind /var/cache/manjaro-arm-tools/pkg/pkg-cache $BUILDDIR/$ARCH/var/cache/pacman/pkg
$NSPAWN $BUILDDIR/$ARCH/ pacman -Syu 1> /dev/null 2>&1
$NSPAWN $BUILDDIR/$ARCH/ --chdir=/build/ makepkg -Asc --noconfirm
if [[ $INSTALL_NEW=true ]]; then
$NSPAWN $BUILDDIR/$ARCH/ --chdir=/build/ makepkg -Asci --noconfirm
else
$NSPAWN $BUILDDIR/$ARCH/ --chdir=/build/ makepkg -Asc --noconfirm
fi
info "Prune and unmount pkg-cache..."
$NSPAWN $BUILDDIR/$ARCH/ paccache -r
umount $BUILDDIR/$ARCH/var/cache/pacman/pkg
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment