Git-Url:
http://git.frugalware.org/gitweb/gitweb.cgi?p=fvbe.git;a=commitdiff;h=2c4c0f40f7231d8943925cc25ec40703485eab3d
commit 2c4c0f40f7231d8943925cc25ec40703485eab3d
Author: DeX77
Date: Fri Jul 14 15:55:07 2017 +0200
* small fixes
diff --git a/bin/fvbe-make-iso b/bin/fvbe-make-iso
index e1063ff..d06c4d4 100755
--- a/bin/fvbe-make-iso
+++ b/bin/fvbe-make-iso
@@ -16,7 +16,7 @@ fvbe_plain_msg() {
local a="$1"
- if [ "$FVBE_COLOR" = "Y" -o "$FVBE_COLOR" = "y" ]; then
+ if [ "$FVBE_COLOR" == "Y" ] || [ "$FVBE_COLOR" == "y" ]; then
/bin/echo -e " \033[1;32m->\033[1;0m \033[1;1m${a}\033[1;0m" >&2
else
/bin/echo " -> ${a}" >&2
@@ -27,7 +27,7 @@ fvbe_info_msg() {
local a="$1"
- if [ "$FVBE_COLOR" = "Y" -o "$FVBE_COLOR" = "y" ]; then
+ if [ "$FVBE_COLOR" = "Y" ] || [ "$FVBE_COLOR" = "y" ]; then
/bin/echo -e " \033[1;34m:: INFO ::\033[1;0m \033[1;1m${a}\033[1;0m" >&2
else
/bin/echo " :: INFO :: ${a}" >&2
@@ -38,7 +38,7 @@ fvbe_warn_msg() {
local a="$1"
- if [ "$FVBE_COLOR" = "Y" -o "$FVBE_COLOR" = "y" ]; then
+ if [ "$FVBE_COLOR" = "Y" ] || [ "$FVBE_COLOR" = "y" ]; then
/bin/echo -e " \033[1;33m:: WARNING ::\033[1;0m \033[1;1m${a}\033[1;0m" >&2
else
/bin/echo " :: WARNING :: ${a}" >&2
@@ -49,7 +49,7 @@ fvbe_error_msg() {
local a="$1"
- if [ "$FVBE_COLOR" = "Y" -o "$FVBE_COLOR" = "y" ]; then
+ if [ "$FVBE_COLOR" = "Y" ] || [ "$FVBE_COLOR" = "y" ]; then
/bin/echo -e " \033[1;31m:: ERROR ::\033[1;0m \033[1;1m${a}\033[1;0m" >&2
else
/bin/echo " :: ERROR :: ${a}" >&2
@@ -80,10 +80,10 @@ _fvbe_check_prog() {
fvbe_check_prog() {
- if [[ -n ${FVBE_PROGS} ]]; then
+ if [ "${#FVBE_PROGS[@]}" -gt 0 ]; then
local prog
fvbe_info_msg "Checking for needed progs.."
- for prog in ${FVBE_PROGS[@]}; do
+ for prog in "${FVBE_PROGS[@]}"; do
_fvbe_check_prog ${prog}
done
else
@@ -332,20 +332,20 @@ else
fvbe_error_msg "...abording!"
fi
-FVBE_ROOTFS_PACKAGES=""
+declare -a FVBE_ROOTFS_PACKAGES
case ${FVBE_ISO_TYPE} in
basic)
- FVBE_ROOTFS_PACKAGES="${FVBE_ROOTFS_PACKAGES_BASIC[@]}"
+ FVBE_ROOTFS_PACKAGES=( "${FVBE_ROOTFS_PACKAGES_BASIC[@]}" )
;;
plasma)
- FVBE_ROOTFS_PACKAGES="${FVBE_ROOTFS_PACKAGES_BASIC[@]}
${FVBE_ROOTFS_PACKAGES_PLASMA[@]}"
+ FVBE_ROOTFS_PACKAGES=("${FVBE_ROOTFS_PACKAGES_BASIC[@]}
${FVBE_ROOTFS_PACKAGES_PLASMA[@]}")
;;
gnome)
- FVBE_ROOTFS_PACKAGES="${FVBE_ROOTFS_PACKAGES_BASIC[@]}
${FVBE_ROOTFS_PACKAGES_GNOME[@]}"
+ FVBE_ROOTFS_PACKAGES=("${FVBE_ROOTFS_PACKAGES_BASIC[@]}
${FVBE_ROOTFS_PACKAGES_GNOME[@]}")
;;
enlightenment)
- FVBE_ROOTFS_PACKAGES="${FVBE_ROOTFS_PACKAGES_BASIC[@]}
${FVBE_ROOTFS_PACKAGES_E[@]}"
+ FVBE_ROOTFS_PACKAGES=("${FVBE_ROOTFS_PACKAGES_BASIC[@]}
${FVBE_ROOTFS_PACKAGES_E[@]}")
;;
*)
fvbe_error_msg "Unknow FVBE_ISO_TYPE , typo?"
@@ -383,7 +383,7 @@ fi
cp /etc/resolv.conf ${FVBE_ROOT}/etc
## now install the rest
-fvbe_chroot pacman-g2 --noconfirm -Sy ${FVBE_ROOTFS_PACKAGES}
+fvbe_chroot pacman-g2 --noconfirm -Sy ${FVBE_ROOTFS_PACKAGES[*]}
## root && guest
fvbe_create_users
@@ -435,4 +435,4 @@ source ./grub-mkrescue-xorriso.conf
grub-mkrescue -o frugalware-${FVBE_ISO_RELEASE}-${FVBE_ISO_TYPE}-x86_64.iso
${FVBE_ROOT} -volid FVBE --xorriso=./bin/grub-mkrescue-sed
-rm -rf ${FVBE_ROOT} tmp *.img *.png *.png var
\ No newline at end of file
+rm -rf ${FVBE_ROOT} tmp *.img *.png *.png var
diff --git a/bin/grub-mkrescue-sed b/bin/grub-mkrescue-sed
index 3dc14d3..d6517e9 100755
--- a/bin/grub-mkrescue-sed
+++ b/bin/grub-mkrescue-sed
@@ -103,14 +103,14 @@ then
xorriso="$MKRESCUE_SED_XORRISO"
else
# Prefer neighboring xorriso binary over system-wide installed one.
- self_dir="$(dirname $(dirname "$0") )"
+ self_dir="$(dirname "$(dirname "$0")" )"
if test -x "$self_dir"/xorriso/xorriso
then
xorriso="$self_dir"/xorriso/xorriso
else
xorriso="xorriso"
fi
-fi
+fi
# MKRESCUE_SED_XORRISO_ARGS will be used as first arguments of the xorriso run.
# (Trailing xorriso arguments may be simply added to the grub-mkrescue
@@ -119,7 +119,7 @@ fi
#
-# Do the work
+# Do the work
#
# grub-mkrescue inquires features by running these arguments
@@ -127,7 +127,7 @@ if test "$*" = "-as mkisofs -help"
then
"$xorriso" "$@"
exit $?
-fi
+fi
echo "frontend/grub-mkrescue-sed.sh mode: $mode" >&2
echo >&2
@@ -170,7 +170,7 @@ do
fi
elif test "$dir" = "."
then
-if echo "$i" | grep '^/tmp/grub.' >/dev/null 2>&1
+if echo "$i" | grep '^/tmp/grub.' >/dev/null 2>&1
then
test -d "$i" && dir="$i"
fi
@@ -303,4 +303,3 @@ then
fi
exit $ret
-
___
Frugalware-git mailing list
Frugalware-git@frugalware.org
http://frugalware.org/mailman/listinfo/frugalware-git