File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- * .sh
21* .img
32* .xz
43* .iso
Original file line number Diff line number Diff line change 1- GITVER := $(shell git rev-parse --short HEAD)
2- VERSION = 0.23
3- SHIN += $(shell find -type f -name '* .sh.in')
4- SCRIPTS += $(SHIN:.sh.in=.sh )
1+ SCRIPTS += $(shell find -type f -name '* .sh')
52DATECODE =$(shell date "+% Y% m% d")
63SHELL =/bin/bash
74
@@ -30,14 +27,7 @@ SUDO := sudo
3027XBPS_REPOSITORY := -r https://repo-default.voidlinux.org/current -r https://repo-default.voidlinux.org/current/musl -r https://repo-default.voidlinux.org/current/aarch64
3128COMPRESSOR_THREADS =2
3229
33- % .sh : % .sh.in
34- sed -e " s|@@MKLIVE_VERSION@@|$( VERSION) $( GITVER) |g" $^ > $@
35- chmod +x $@
36-
37- all : $(SCRIPTS )
38-
39- clean :
40- -rm -f * .sh
30+ all :
4131
4232distdir-$(DATECODE ) :
4333 mkdir -p distdir-$(DATECODE )
@@ -89,4 +79,4 @@ pxe-all-print:
8979void-% -NETBOOT-$(DATECODE ) .tar.gz : $(SCRIPTS ) void-% -ROOTFS-$(DATECODE ) .tar.xz
9080 $(SUDO ) ./mknet.sh void-$* -ROOTFS-$(DATECODE ) .tar.xz
9181
92- .PHONY : clean dist rootfs-all-print rootfs-all platformfs-all-print platformfs-all pxe-all-print pxe-all
82+ .PHONY : all dist rootfs-all-print rootfs-all platformfs-all-print platformfs-all pxe-all-print pxe-all
Original file line number Diff line number Diff line change @@ -10,9 +10,6 @@ This repository contains utilities for Void Linux:
1010 * mkrootfs (The Void Linux rootfs maker for ARM platforms)
1111 * mknet (Script to generate netboot tarballs for Void)
1212
13- ## Build Dependencies
14- * make
15-
1613## Dependencies
1714 * Compression type for the initramfs image
1815 * liblz4 (for lz4, xz) (default)
@@ -22,11 +19,7 @@ This repository contains utilities for Void Linux:
2219
2320## Usage
2421
25- Type
26-
27- $ make
28-
29- and then see the usage output:
22+ See the usage output:
3023
3124 $ ./mklive.sh -h
3225 $ ./mkrootfs.sh -h
Original file line number Diff line number Diff line change @@ -90,7 +90,11 @@ if [ ! -x mklive.sh ]; then
9090fi
9191
9292if [ -x installer.sh ]; then
93- install -Dm755 installer.sh " $INCLUDEDIR " /usr/bin/void-installer
93+ . ./version.sh
94+ installer=$( mktemp)
95+ sed " s/@@MKLIVE_VERSION@@/${MKLIVE_VERSION} /" installer.sh > " $installer "
96+ install -Dm755 " $installer " " $INCLUDEDIR " /usr/bin/void-installer
97+ rm " $installer "
9498else
9599 echo installer.sh not found >&2
96100 exit 1
Original file line number Diff line number Diff line change 2525# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626# -
2727
28+ . ./version.sh
29+
2830# Make sure we don't inherit these from env.
2931SOURCE_DONE=
3032HOSTNAME_DONE=
File renamed without changes.
Original file line number Diff line number Diff line change 2525# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2626# -
2727
28+ . ./version.sh
29+
2830readonly PROGNAME=$( basename " $0 " )
2931readonly ARCH=$( uname -m)
3032
@@ -94,7 +96,7 @@ while getopts "b:B:o:r:s:x:h:V" opt; do
9496 r) ROOT_FSTYPE=" $OPTARG " ;;
9597 s) IMGSIZE=" $OPTARG " ;;
9698 x) COMPRESSOR_THREADS=" $OPTARG " ;;
97- V) echo " $PROGNAME @@ MKLIVE_VERSION@@ " ; exit 0;;
99+ V) echo " $PROGNAME $ MKLIVE_VERSION" ; exit 0;;
98100 h) usage;;
99101 esac
100102done
Original file line number Diff line number Diff line change 2929trap ' error_out $? $LINENO' INT TERM 0
3030umask 022
3131
32+ . ./version.sh
33+
3234readonly REQUIRED_PKGS=" base-files libgcc dash coreutils sed tar gawk syslinux grub-i386-efi grub-x86_64-efi squashfs-tools xorriso"
3335readonly INITRAMFS_PKGS=" binutils xz device-mapper dhclient dracut-network openresolv"
3436readonly PROGNAME=$( basename " $0 " )
@@ -292,7 +294,7 @@ generate_iso_image() {
292294#
293295# main()
294296#
295- while getopts " a:b:r:c:C:T:Kk:l:i:I:S:s:o:p:v:h " opt; do
297+ while getopts " a:b:r:c:C:T:Kk:l:i:I:S:s:o:p:v:Vh " opt; do
296298 case $opt in
297299 a) BASE_ARCH=" $OPTARG " ;;
298300 b) BASE_SYSTEM_PKG=" $OPTARG " ;;
@@ -310,6 +312,7 @@ while getopts "a:b:r:c:C:T:Kk:l:i:I:S:s:o:p:v:h" opt; do
310312 C) BOOT_CMDLINE=" $OPTARG " ;;
311313 T) BOOT_TITLE=" $OPTARG " ;;
312314 v) LINUX_VERSION=" $OPTARG " ;;
315+ V) echo " $PROGNAME $MKLIVE_VERSION " ; exit 0 ;;
313316 h) usage;;
314317 * ) usage;;
315318 esac
Original file line number Diff line number Diff line change 2727# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2828# -
2929
30+ . ./version.sh
31+
3032readonly PROGNAME=$( basename " $0 " )
3133readonly REQTOOLS=" xbps-install tar"
3234
7779# SCRIPT EXECUTION STARTS HERE
7880# ########################################
7981
80- while getopts " r:c:C:T:K:i:o:k:l:h " opt; do
82+ while getopts " r:c:C:T:K:i:o:k:l:Vh " opt; do
8183 case $opt in
8284 r) XBPS_REPOSITORY=" --repository=$OPTARG $XBPS_REPOSITORY " ;;
8385 c) XBPS_CACHEDIR=" --cachedir=$OPTARG " ;;
@@ -89,6 +91,7 @@ while getopts "r:c:C:T:K:i:o:k:l:h" opt; do
8991 C) BOOT_CMDLINE=" $OPTARG " ;;
9092 T) BOOT_TITLE=" $OPTARG " ;;
9193 S) SPLASH_IMAGE=" OPTARG" ;;
94+ V) echo " $PROGNAME $MKLIVE_VERSION " ; exit 0 ;;
9295 h) usage;;
9396 esac
9497done
Original file line number Diff line number Diff line change 2424# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
2525# -
2626
27+ . ./version.sh
28+
2729readonly PROGNAME=$( basename " $0 " )
2830readonly ARCH=$( uname -m)
2931readonly REQTOOLS=" xbps-install xbps-reconfigure tar xz"
@@ -87,7 +89,7 @@ while getopts "b:p:k:c:C:r:x:o:nhV" opt; do
8789 o) FILENAME=" $OPTARG " ;;
8890 n) COMPRESSION=" n" ;;
8991 h) usage; exit 0 ;;
90- V) echo " $PROGNAME @@ MKLIVE_VERSION@@ " ; exit 0 ;;
92+ V) echo " $PROGNAME $ MKLIVE_VERSION" ; exit 0 ;;
9193 esac
9294done
9395shift $(( OPTIND - 1 ))
You can’t perform that action at this time.
0 commit comments