summaryrefslogtreecommitdiff
path: root/libremakepkg
diff options
context:
space:
mode:
Diffstat (limited to 'libremakepkg')
-rwxr-xr-xlibremakepkg18
1 files changed, 14 insertions, 4 deletions
diff --git a/libremakepkg b/libremakepkg
index cf3f13f..78ebefb 100755
--- a/libremakepkg
+++ b/libremakepkg
@@ -18,24 +18,34 @@
# You should have received a copy of the GNU General Public License
# along with Parabola. If not, see <http://www.gnu.org/licenses/>.
+source /etc/libretools.conf
+
if [ $UID -ne 0 ]; then
- echo "This script must be run as root"
+ error "This script must be run as root"
exit 1
fi
-source /etc/libretools.conf
+msg "Checking PKGBUILD for non-free issues"
+pkgbuild-check-nonfree ||{
+ if [[$?=15]]; then
+ error "PKGBUILD contains non-free issues"
+ exit 15
+ else
+ error "Check failed, continuing"
+ fi
+}
[[ -z $1 ]] && {
CLEAN="-c"
- echo "Updating the main chroot"
+ msg "Updating the main chroot"
mount -o bind ${CACHEDIR} ${CHROOTDIR}/${CHROOT}/var/cache/pacman/pkg || exit 1
mkarchroot -u -- ${CHROOTDIR}/${CHROOT}
mount -o bind ${CACHEDIR} ${CHROOTDIR}/${CHCOPY}/var/cache/pacman/pkg || exit 1
}
-echo "Creating the package"
+msg "Creating the package"
makechrootpkg $CLEAN -r ${CHROOTDIR} -l ${CHCOPY} -- $@
exit 0