diff options
author | Loui Chang <louipc.ist@gmail.com> | 2009-09-04 01:18:07 +0200 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2009-09-04 04:17:34 +0200 |
commit | 1558dfbf3b2a42f43594acf6e3d8f9b329ff1133 (patch) | |
tree | 79d61f2560d84c8d06b81fe49969fb261796e084 | |
parent | 984cbd4eb023001668eea530e2b5ed2e57ba3693 (diff) | |
download | mkinitcpio-1558dfbf3b2a42f43594acf6e3d8f9b329ff1133.tar.gz mkinitcpio-1558dfbf3b2a42f43594acf6e3d8f9b329ff1133.tar.xz |
Exit with error if PRESETS seems to be defined as an array.
Signed-off-by: Loui Chang <louipc.ist@gmail.com>
Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
-rwxr-xr-x | mkinitcpio | 8 |
1 files changed, 6 insertions, 2 deletions
@@ -113,6 +113,8 @@ while getopts ':c:k:s:b:g:a:p:m:vH:LMhS:' arg; do done shift $((${OPTIND} - 1)) +. "${FUNCTIONS}" + # use preset $PRESET if [ -n "${PRESET}" ]; then if [ -f "${PRESETDIR}/${PRESET}.preset" ]; then @@ -130,6 +132,10 @@ if [ -n "${PRESET}" ]; then # Build all images echo "==> Using ${PRESETDIR}/${PRESET}.preset" + if grep -q "PRESETS=(" ${PRESETDIR}/${PRESET}.preset; then + die "Invalid definition of PRESETS." + fi + . ${PRESETDIR}/${PRESET}.preset for p in ${PRESETS}; do @@ -224,8 +230,6 @@ fi BASEDIR=$(echo ${BASEDIR} | tr -s /) MODULEDIR=$(echo ${MODULEDIR} | tr -s /) -. "${FUNCTIONS}" - if [ "${SHOW_AUTOMODS}" = "y" ]; then echo "Modules autodetected:" . "${INSTDIR}/autodetect" |