mklive.sh.in: fix generation of local repo; use target xbps utils; indent
This commit is contained in:
parent
3d7b517071
commit
1f2372b35b
14
mklive.sh.in
14
mklive.sh.in
@ -23,9 +23,6 @@
|
|||||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||||
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#-
|
#-
|
||||||
|
|
||||||
# vim: set ts=4 sw=4 et:
|
|
||||||
|
|
||||||
trap "echo; error_out $?" INT QUIT
|
trap "echo; error_out $?" INT QUIT
|
||||||
|
|
||||||
CHROOT_CMD="linux-user-chroot --unshare-ipc --unshare-pid --unshare-net \
|
CHROOT_CMD="linux-user-chroot --unshare-ipc --unshare-pid --unshare-net \
|
||||||
@ -47,7 +44,7 @@ error_out() {
|
|||||||
write_etc_motd() {
|
write_etc_motd() {
|
||||||
cat >> "$ROOTFS/etc/motd" <<_EOF
|
cat >> "$ROOTFS/etc/motd" <<_EOF
|
||||||
###############################################################################
|
###############################################################################
|
||||||
Autogenerated by void-mklive "@@MKLIVE_VERSION@@"
|
Autogenerated by void-mklive "0.10 3d7b51707195b6e765b4d1d59d70266ebe87ce1e"
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
|
|
||||||
Welcome to the Void Linux Live system, you have been autologged in.
|
Welcome to the Void Linux Live system, you have been autologged in.
|
||||||
@ -113,7 +110,7 @@ Usage: $(basename $0) [options]
|
|||||||
|
|
||||||
Options:
|
Options:
|
||||||
-C file Path to configuration file (defaults to ~/.mklive.conf)
|
-C file Path to configuration file (defaults to ~/.mklive.conf)
|
||||||
-c (gzip|bzip2|xz) Compression type for the squashfs/initramfs image.
|
-c (gzip|bzip2|xz) ompression type for the squashfs/initramfs image.
|
||||||
-l "pkgname ..." Generate a local repository in the image with these packages.
|
-l "pkgname ..." Generate a local repository in the image with these packages.
|
||||||
Packages must be delimited by blanks.
|
Packages must be delimited by blanks.
|
||||||
-r rootdir Use this directory to generate the image (if unset,
|
-r rootdir Use this directory to generate the image (if unset,
|
||||||
@ -190,10 +187,11 @@ generate_local_repository() {
|
|||||||
while [ $# -ne 0 ]; do
|
while [ $# -ne 0 ]; do
|
||||||
pkgn=$1; action=$2; ver=$3; repo=$4; binpkg=$5; arch=$6
|
pkgn=$1; action=$2; ver=$3; repo=$4; binpkg=$5; arch=$6
|
||||||
shift 6
|
shift 6
|
||||||
bpkg=$repo/$arch/$binpkg
|
bpkg=$repo/$binpkg
|
||||||
cp -f $bpkg $ROOTFS/packages
|
cp -f $bpkg $ROOTFS/packages
|
||||||
done
|
done
|
||||||
$XBPS_RINDEX_CMD -a $ROOTFS/packages/*.xbps 2>&1 >>$LOGFILE
|
LD_PRELOAD="$ROOTFS/usr/lib/libxbps.so" \
|
||||||
|
$ROOTFS/usr/sbin/$XBPS_RINDEX_CMD -a $ROOTFS/packages/*.xbps 2>&1 >>$LOGFILE
|
||||||
rm -f $ROOTFS/packages/index-files.plist
|
rm -f $ROOTFS/packages/index-files.plist
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -472,3 +470,5 @@ hsize=$(du -sh "$OUTPUT_FILE"|awk '{print $1}')
|
|||||||
info_msg "Created $(readlink -f $OUTPUT_FILE) ($hsize) successfully."
|
info_msg "Created $(readlink -f $OUTPUT_FILE) ($hsize) successfully."
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
||||||
|
# vim: set ts=4 sw=4 et:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user