diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2017-08-13 13:41:22 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2017-08-13 13:41:22 -0500 |
commit | 44f7fe461239700450e6d1a8c10a201eab7ccb44 (patch) | |
tree | b260388302f19f30a5c4336e516b5f39f2df3ee2 | |
parent | f18f3098005f549e39726bd2c3d0f36547ef859a (diff) | |
download | image-44f7fe461239700450e6d1a8c10a201eab7ccb44.tar.gz image-44f7fe461239700450e6d1a8c10a201eab7ccb44.tar.bz2 image-44f7fe461239700450e6d1a8c10a201eab7ccb44.tar.xz image-44f7fe461239700450e6d1a8c10a201eab7ccb44.zip |
Add [-v VERSION] parameter to script and manpage
-rwxr-xr-x | adelie-build-cd | 13 | ||||
-rw-r--r-- | adelie-build-cd.8 | 7 |
2 files changed, 15 insertions, 5 deletions
diff --git a/adelie-build-cd b/adelie-build-cd index 8c031ff..f5332de 100755 --- a/adelie-build-cd +++ b/adelie-build-cd @@ -1,6 +1,7 @@ #!/bin/sh def_arch=$(uname -m) +def_ver="1.0-alpha3" declare -r PROGNAME=$(basename $0) @@ -83,6 +84,10 @@ while [ -n "$1" ]; do shift declare -r MY_PHASE=$1 ;; + -v | --version) + shift + declare -r MY_VER=$1 + ;; *) usage >&2 exit -1 @@ -95,6 +100,7 @@ set -a declare -r ARCH=${MY_ARCH:-$def_arch} declare -r LDARCH=${LDARCH:-$ARCH} declare -r PHASE=${MY_PHASE:-all} +declare -r VERSION=${MY_VER:-$def_ver} set +a ensure_commands @@ -150,7 +156,7 @@ install_pkgs() { mkdir -p squashroot-$ARCH/etc/apk/keys cp 'packages@adelielinux.org.pub' squashroot-$ARCH/etc/apk/keys/ - apk --arch $ARCH -X "https://distfiles.adelielinux.org/adelie/1.0-alpha/$EXTRA_MIRROR" -U --root squashroot-$ARCH --initdb add $PACKAGES $ARCH_PKGS + apk --arch $ARCH -X "https://distfiles.adelielinux.org/adelie/$ver/system/$EXTRA_MIRROR" -U --root squashroot-$ARCH --initdb add $PACKAGES $ARCH_PKGS } make_structure() { @@ -193,7 +199,8 @@ make_structure() { RESOLVE cat >squashroot-$ARCH/etc/apk/repositories <<-REPOS - https://distfiles.adelielinux.org/adelie/1.0-alpha/$EXTRA_MIRROR + https://distfiles.adelielinux.org/adelie/$VERSION/system/$EXTRA_MIRROR + https://distfiles.adelielinux.org/adelie/$VERSION/user/$EXTRA_MIRROR REPOS cat >squashroot-$ARCH/etc/issue <<-ISSUE @@ -293,7 +300,7 @@ create_iso() { header 'Creating the CD...' declare -r CD_PARAMS=$(cat iso-params-$ARCH) - mkisofs -o adelie-${DO_FULL:-live}-$ARCH-1.0-ALPHA2-$(date +%Y%m%d).iso -joliet -rational-rock -V "Adelie 1.0a2 $ARCH" ${CD_PARAMS} cdroot-$ARCH + mkisofs -o adelie-${DO_FULL:-live}-$ARCH-$VERSION-$(date +%Y%m%d).iso -joliet -rational-rock -V "Adelie $VERSION $ARCH" ${CD_PARAMS} cdroot-$ARCH } case $PHASE in diff --git a/adelie-build-cd.8 b/adelie-build-cd.8 index a56d019..41b4be2 100644 --- a/adelie-build-cd.8 +++ b/adelie-build-cd.8 @@ -1,4 +1,4 @@ -.Dd January 29, 2017 +.Dd August 13, 2017 .Dt ADELIE-BUILD-CD 8 SMM .Os "Adélie Linux" @@ -13,6 +13,7 @@ .Op Fl a Ar ARCH .Op Fl f .Op Fl p Ar PHASE +.Op Fl v Ar VERSION .Sh DESCRIPTION @@ -22,7 +23,7 @@ creates a live CD image or installer CD image for Adélie Linux using and .Xr mkisofs 8 . -.Bl -tag -width "-p PHASE" -offset indent -compact +.Bl -tag -width "-v VERSION" -offset indent -compact .It Fl a Ar ARCH You may specify any architecture available in the Adélie repository for .Ar ARCH ; @@ -42,6 +43,8 @@ this flag is not specified, a live image will be created instead. Specifies the phase of image creation to make as specified in the .Sy Phases section. +.It Fl v Ar VERSION +Specifies the version of Adélie Linux to use for the created ISO. .El |