aboutsummaryrefslogtreecommitdiffstats
path: root/create_arm_image.sh
diff options
context:
space:
mode:
authorJybz <j.biernacki@free.fr>2020-09-10 14:29:48 +0200
committerJybz <j.biernacki@free.fr>2020-09-10 14:29:48 +0200
commita30406b8fc802c5889bffba4332b848bc0ce59d9 (patch)
tree88a13b73324a9f7072f43fbe412a22e5c9143687 /create_arm_image.sh
parent08a6727aaa40e327edd7aaacfc8eed1b46fe3924 (diff)
downloadmageia4arm-a30406b8fc802c5889bffba4332b848bc0ce59d9.tar
mageia4arm-a30406b8fc802c5889bffba4332b848bc0ce59d9.tar.gz
mageia4arm-a30406b8fc802c5889bffba4332b848bc0ce59d9.tar.bz2
mageia4arm-a30406b8fc802c5889bffba4332b848bc0ce59d9.tar.xz
mageia4arm-a30406b8fc802c5889bffba4332b848bc0ce59d9.zip
Add alternative for --config between a name in ./platform or a path to another place. Preparing the mageia4arm spec for RPM.
Diffstat (limited to 'create_arm_image.sh')
-rwxr-xr-xcreate_arm_image.sh23
1 files changed, 14 insertions, 9 deletions
diff --git a/create_arm_image.sh b/create_arm_image.sh
index a0d285c..2649bc0 100755
--- a/create_arm_image.sh
+++ b/create_arm_image.sh
@@ -55,10 +55,10 @@ info ${0}
# error "qemu-user-static package is needed."
# exit ${ERR_DEPENDENCY_MISSING}
#fi
-if [ 0 -ne $(id -u) ]; then
- error "Script need to be run as root."
- exit ${ERR_NOT_ROOT}
-fi
+# if [ 0 -ne $(id -u) ]; then
+# error "Script need to be run as root."
+# exit ${ERR_NOT_ROOT}
+# fi
SOURCE_PATH="$(/usr/bin/dirname "$(readlink -f "${0}")")"
INSTALL_PATH="$(pwd)/build"
@@ -119,7 +119,12 @@ while true; do
shift
;;
--config)
- CONFIG_PATH="${PLATFORMS_PATH}/${2}"
+ PATH_NOT_NAME=$(echo "${2}" | grep '/' 2>&1 1>/dev/null && echo "true" || echo "false" )
+ if [ $PATH_NOT_NAME == true ] ; then
+ CONFIG_PATH="${2}"
+ else
+ CONFIG_PATH="${PLATFORMS_PATH}/${2}"
+ fi
shift 2
;;
--create-chroot)
@@ -186,9 +191,9 @@ while true; do
fi
shift
;;
-# --)
-# shift
-# break;;
+ --)
+ shift
+ break;;
*)
error "Parameter ${1} does not exists "
exit ${ERR_1};;
@@ -298,6 +303,7 @@ case ${OPT} in
fi
fi
createImageWrap #Create the empty .img
+ mountPartitions
createchroot #Check qemu and activate it
if [ ${INSTALL_METHOD} = "urpmi" ]; then
addurpmimedia
@@ -308,7 +314,6 @@ case ${OPT} in
mkfstab
preparechroot
jumpchroot
- mountPartitions
copyingsystem
bunrningBootloader
unmountingPartitions