summaryrefslogtreecommitdiff
path: root/libremakepkg
diff options
context:
space:
mode:
authorNicolás Reynolds <apoyosis@correo.inta.gob.ar>2010-10-19 10:13:19 -0300
committerNicolás Reynolds <apoyosis@correo.inta.gob.ar>2010-10-19 10:13:19 -0300
commiteb4d08dfe67beb0e8972c98a02dd2881f12b1d5a (patch)
tree03ff53dd3a94b80bc60a3822ca23359aaed1dc36 /libremakepkg
parent97933eba3314fe833ebe47cc3cec5295d2bdba56 (diff)
Libremakepkg updates the chroot dir and builds in a clean environment
Diffstat (limited to 'libremakepkg')
-rwxr-xr-xlibremakepkg20
1 files changed, 20 insertions, 0 deletions
diff --git a/libremakepkg b/libremakepkg
new file mode 100755
index 0000000..9f02f84
--- /dev/null
+++ b/libremakepkg
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+if [ $UID -ne 0 ]; then
+ echo "This script must be run as root"
+ exit 1
+fi
+if [ ! -e /etc/libretools.conf ]; then
+ echo "Config file doesn't exists"
+ exit 1
+fi
+
+source /etc/libretools.conf
+
+echo "Updating the main chroot"
+mkarchroot -u -c ${CACHEDIR} ${CHROOTDIR}/${CHROOT}
+
+echo "Creating the package"
+makechrootpkg -c -r ${CHROOTDIR} -l ${CHCOPY} -- $@
+
+exit 0