summaryrefslogtreecommitdiff
path: root/libremakepkg
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernandez <hahj87@gmail.com>2011-03-25 07:09:23 -0700
committerJoshua Ismael Haase Hernandez <hahj87@gmail.com>2011-03-25 07:09:23 -0700
commit691baba22e7fb1fe47005558ca92e540566fe383 (patch)
tree8fc6367afbe472c51664ff2edf0310715b8712dd /libremakepkg
parent5f47cf2a8f096f284bb1a9278fa676960ae65847 (diff)
Added libremessages and format in scripts
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