summaryrefslogtreecommitdiff
path: root/adelie-build-cd
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2017-01-29 14:14:38 -0600
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2017-01-29 14:14:38 -0600
commit0bc965d4018075e44877c1f74d231e515a7fadd3 (patch)
treeb3d5b614a7dd16b2d7ed18107919db8e4081c037 /adelie-build-cd
parent96a0e248ba150a60703ca8dc2c411f249b1f867b (diff)
downloadimage-0bc965d4018075e44877c1f74d231e515a7fadd3.tar.gz
image-0bc965d4018075e44877c1f74d231e515a7fadd3.tar.bz2
image-0bc965d4018075e44877c1f74d231e515a7fadd3.tar.xz
image-0bc965d4018075e44877c1f74d231e515a7fadd3.zip
Actually wire up -p; phase-based creation is done
Diffstat (limited to 'adelie-build-cd')
-rwxr-xr-xadelie-build-cd43
1 files changed, 33 insertions, 10 deletions
diff --git a/adelie-build-cd b/adelie-build-cd
index 0a7ee3d..addaa92 100755
--- a/adelie-build-cd
+++ b/adelie-build-cd
@@ -81,7 +81,7 @@ while [ -n "$1" ]; do
;;
-p | --phase)
shift
- declare -r PHASE=$1
+ declare -r MY_PHASE=$1
;;
*)
usage >&2
@@ -94,7 +94,7 @@ done
set -a
declare -r ARCH=${MY_ARCH:-$def_arch}
declare -r LDARCH=${LDARCH:-$ARCH}
-declare -r PHASE=${PHASE:-all}
+declare -r PHASE=${MY_PHASE:-all}
set +a
ensure_commands
@@ -272,7 +272,7 @@ make_structure() {
squash_it() {
header 'Creating compressed file system image...'
- mksquashfs squashroot-$ARCH cdroot-$ARCH/adelie.squashfs
+ mksquashfs squashroot-$ARCH cdroot-$ARCH/adelie.squashfs -noappend
}
make_initrd() {
@@ -341,10 +341,33 @@ create_iso() {
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
}
-#clean_dirs
-#install_pkgs
-#make_structure
-#squash_it
-#make_initrd
-prepare_cdroot
-create_iso
+case $PHASE in
+ clean)
+ clean_dirs
+ ;;
+ install)
+ install_pkgs
+ make_structure
+ ;;
+ initrd)
+ make_initrd
+ ;;
+ iso)
+ squash_it
+ prepare_cdroot
+ create_iso
+ ;;
+ all)
+ clean_dirs
+ install_pkgs
+ make_structure
+ make_initrd
+ squash_it
+ prepare_cdroot
+ create_iso
+ ;;
+ *)
+ fatal
+ printf 'Unknown phase %s. Stop.\n' $PHASE
+ ;;
+esac