summaryrefslogtreecommitdiff
path: root/adelie-build-cd
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2017-08-13 13:41:22 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2017-08-13 13:41:22 -0500
commit44f7fe461239700450e6d1a8c10a201eab7ccb44 (patch)
treeb260388302f19f30a5c4336e516b5f39f2df3ee2 /adelie-build-cd
parentf18f3098005f549e39726bd2c3d0f36547ef859a (diff)
downloadimage-44f7fe461239700450e6d1a8c10a201eab7ccb44.tar.gz
image-44f7fe461239700450e6d1a8c10a201eab7ccb44.tar.bz2
image-44f7fe461239700450e6d1a8c10a201eab7ccb44.tar.xz
image-44f7fe461239700450e6d1a8c10a201eab7ccb44.zip
Add [-v VERSION] parameter to script and manpage
Diffstat (limited to 'adelie-build-cd')
-rwxr-xr-xadelie-build-cd13
1 files changed, 10 insertions, 3 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