aboutsummaryrefslogtreecommitdiffstats
path: root/create_arm_image.sh
diff options
context:
space:
mode:
authorJybz <j.biernacki+mga@free.fr>2020-12-01 09:22:56 +0100
committerJybz <j.biernacki+mga@free.fr>2020-12-01 09:22:56 +0100
commit0c7ada6d6769d2c9f55891e6b0e52e776196644e (patch)
tree9d6d3a3438386e8a67d6e4be7c2db3a5d63fb9c4 /create_arm_image.sh
parentc1edc59140237a1dd802534ca82d7c1a3a98e566 (diff)
downloadmageia4arm-0c7ada6d6769d2c9f55891e6b0e52e776196644e.tar
mageia4arm-0c7ada6d6769d2c9f55891e6b0e52e776196644e.tar.gz
mageia4arm-0c7ada6d6769d2c9f55891e6b0e52e776196644e.tar.bz2
mageia4arm-0c7ada6d6769d2c9f55891e6b0e52e776196644e.tar.xz
mageia4arm-0c7ada6d6769d2c9f55891e6b0e52e776196644e.zip
add --mga-version option and rearrange bashcompletion jump list
Diffstat (limited to 'create_arm_image.sh')
-rwxr-xr-xcreate_arm_image.sh51
1 files changed, 31 insertions, 20 deletions
diff --git a/create_arm_image.sh b/create_arm_image.sh
index 75c7f7b..14de0a1 100755
--- a/create_arm_image.sh
+++ b/create_arm_image.sh
@@ -25,26 +25,27 @@ source "$(dirname $(realpath "$0"))/functions.sh"
function help() {
echo -e "${CMDNAME} [option]"
echo -e "Options:"
- echo -e "--all create ready to burn image of Mageia ${MAGEIA_VERSION}"
- echo -e "--build-path Path to the build directory of the image of Mageia ${MAGEIA_VERSION}"
- echo -e "--clean Clean all (suppress all) to make a new image"
- echo -e "--log [file] logs the output into mga4arm-YYYY-MM-DD-HH-MM-\${config}.log or specific file."
- echo -e "--config [name | path] A name of a default config or a path to a config files"
- echo -e "--target target system (for now rpi, odroid)"
- echo -e "--target-version version of the target (0, 1, 2, 3 for rpi, 3 or 4 for odroid)"
-# echo -e "--bootfs filesystem of boot partition (ext4 or vfat) default: ext4"
- echo -e "--nonfree activate nonfree repos"
- echo -e "--size size of image default: 7Go"
- echo -e "--tainted activate tainted repos"
- echo -e "--desktop [xfce|...] add a desktop environment task"
- echo -e "--package \"pkg1 pkg2\" One space separated list of package to install"
+ echo -e "--all create ready to burn image of Mageia ${MAGEIA_VERSION}"
+ echo -e "--build-path Path to the build directory of the image of Mageia ${MAGEIA_VERSION}"
+ echo -e "--clean Clean all (suppress all) to make a new image"
+ echo -e "--log [file] logs the output into mga4arm-YYYY-MM-DD-HH-MM-\${config}.log or specific file."
+ echo -e "--config [name | path] A name of a default config or a path to a config files"
+ echo -e "--target target system (for now rpi, odroid)"
+ echo -e "--target-version version of the target (0, 1, 2, 3 for rpi, 3 or 4 for odroid)"
+# echo -e "--bootfs filesystem of boot partition (ext4 or vfat) default: ext4"
+ echo -e "--mga-version [1-7,cauldron] define which version of mageia to build"
+ echo -e "--nonfree activate nonfree repos"
+ echo -e "--size size of image default: 7Go"
+ echo -e "--tainted activate tainted repos"
+ echo -e "--desktop [xfce|...] add a desktop environment task"
+ echo -e "--package \"pkg1 pkg2\" One space separated list of package to install"
- echo -e "\nBuild levels:"
- echo -e "--create-chroot Create the chroot directory"
- echo -e "--install-basesystem install base system"
- echo -e "--add-urpmimedia add mirrors for urpmi"
- echo -e "--chroot chroot to arm directory and launch packages installation"
- echo -e "--create-image Create the image of Mageia ${MAGEIA_VERSION}"
+ echo -e "\nBuild levels:"
+ echo -e "--create-chroot Create the chroot directory"
+ echo -e "--install-basesystem install base system"
+ echo -e "--add-urpmimedia add mirrors for urpmi"
+ echo -e "--chroot chroot to arm directory and launch packages installation"
+ echo -e "--create-image Create the image of Mageia ${MAGEIA_VERSION}"
echo -e "\nFor image size, make sure it fit on physical support. (Default size is 7 Go)"
}
@@ -102,7 +103,7 @@ fi
# parsing commandline
-TEMP=$(getopt -o h,a --long add-urpmimedia,add-checksum,all,help,clean,create-chroot,prepare-chroot,jump-chroot,create-image,config:,compress,target:,target-version:,chroot,bootfs:,install-basesystem,update-mirror,build-path:,size:,sign,nonfree,tainted -n ${CMDNAME} -- "${@}")
+TEMP=$(getopt -o h,a --long add-urpmimedia,add-checksum,all,help,clean,create-chroot,prepare-chroot,jump-chroot,create-image,config:,compress,mga-version:,target:,target-version:,chroot,bootfs:,install-basesystem,update-mirror,build-path:,size:,sign,nonfree,tainted -n ${CMDNAME} -- "${@}")
if [ ${?} -ne 0 ] ; then error "line ${LINENO} Failed parsing options." >&2 ; exit ${ERR_1} ; fi
eval set -- "${TEMP}"
@@ -188,6 +189,16 @@ while true; do
fi
shift
;;
+ --mga-version)
+ if [ "xcauldron" = "x${2}" ]; then
+ MAGEIA_VERSION="${2}"
+ elif [ "${2}" -gt 0 ]; then
+ MAGEIA_VERSION="${2}"
+ else
+ exit ${ERR_1}
+ fi
+ shift 2
+ ;;
--nonfree)
NONFREE_P=1
shift