Consistently using the pipe as seperator in sed commands now.

This commit is contained in:
Daniel Baumann 2008-01-15 08:25:29 +01:00
parent 3ea7ef688f
commit 948730f93a
18 changed files with 72 additions and 72 deletions

View File

@ -12,9 +12,9 @@ set -e
Read_conffile () Read_conffile ()
{ {
FILES="${1} ${1}.${LH_ARCHITECTURE} ${1}.${DISTRIBUTION}" FILES="${1} ${1}.${LH_ARCHITECTURE} ${1}.${DISTRIBUTION}"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's/^lh_//')" FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||')"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's/^lh_//').${ARCHITECTURE}" FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||').${ARCHITECTURE}"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's/^lh_//').${DISTRIBUTION}" FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's|^lh_||').${DISTRIBUTION}"
for FILE in ${FILES} for FILE in ${FILES}
do do

View File

@ -436,24 +436,24 @@ Set_defaults ()
;; ;;
gnome-desktop) gnome-desktop)
LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's/gnome-desktop//') standard-x11" LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's|gnome-desktop||') standard-x11"
LH_TASKS="$(echo ${LH_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/gnome-desktop//' -e 's/desktop//') standard laptop gnome-desktop desktop" LH_TASKS="$(echo ${LH_TASKS} | sed -e 's|standard||' -e 's|laptop||' -e 's|gnome-desktop||' -e 's|desktop||') standard laptop gnome-desktop desktop"
;; ;;
kde-desktop) kde-desktop)
LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's/kde-desktop//') standard-x11" LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's|kde-desktop||') standard-x11"
LH_TASKS="$(echo ${LH_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/kde-desktop//' -e 's/desktop//') standard laptop kde-desktop desktop" LH_TASKS="$(echo ${LH_TASKS} | sed -e 's|standard||' -e 's|laptop||' -e 's|kde-desktop||' -e 's|desktop||') standard laptop kde-desktop desktop"
;; ;;
xfce-desktop) xfce-desktop)
LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's/xfce-desktop//') standard-x11" LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's|xfce-desktop||') standard-x11"
LH_TASKS="$(echo ${LH_TASKS} | sed -e 's/standard//' -e 's/laptop//' -e 's/xfce-desktop//' -e 's/desktop//') standard laptop xfce-desktop desktop" LH_TASKS="$(echo ${LH_TASKS} | sed -e 's|standard||' -e 's|laptop||' -e 's|xfce-desktop||' -e 's|desktop||') standard laptop xfce-desktop desktop"
;; ;;
esac esac
done done
LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's/ //g')" LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's| ||g')"
LH_TASKS="$(echo ${LH_TASKS} | sed -e 's/ //g')" LH_TASKS="$(echo ${LH_TASKS} | sed -e 's| ||g')"
# Setting tasks # Setting tasks
# LH_TASKS # LH_TASKS

View File

@ -27,7 +27,7 @@ Losetup ()
${LH_ROOT_COMMAND} ${LH_LOSETUP} "${DEVICE}" "${FILE}" ${LH_ROOT_COMMAND} ${LH_LOSETUP} "${DEVICE}" "${FILE}"
else else
CYLINDERS="$(echo "$FDISK_OUT" | sed -ne "s_^$LOOPDEVICE[ *]*\([0-9]*\).*_\1_p")" CYLINDERS="$(echo "$FDISK_OUT" | sed -ne "s|^$LOOPDEVICE[ *]*\([0-9]*\).*|\1|p")"
OFFSET="$(expr ${CYLINDERS} '*' 512)" OFFSET="$(expr ${CYLINDERS} '*' 512)"
Echo_message "Mounting ${DEVICE} with offset ${OFFSET}" Echo_message "Mounting ${DEVICE} with offset ${OFFSET}"

View File

@ -89,7 +89,7 @@ Check_installed ()
INSTALL_STATUS=1 INSTALL_STATUS=1
fi fi
else else
FILE="$(echo ${FILE} | sed -e 's/chroot//')" FILE="$(echo ${FILE} | sed -e 's|chroot||')"
if [ ! -e "${FILE}" ] if [ ! -e "${FILE}" ]
then then

View File

@ -34,9 +34,9 @@ Expand_packagelist_file ()
shift shift
shift shift
for INCLUDE in $(sed -ne 's/^#<include> \(.*\)/\1/gp' "${FILE}"); for INCLUDE in $(sed -ne 's|^#<include> \(.*\)|\1|gp' "${FILE}");
do do
Expand_packagelist "${INCLUDE}" "${@}" Expand_packagelist "${INCLUDE}" "${@}"
done done
sed -ne 's/^\([^#].*\)/\1\n/gp' "${FILE}" sed -ne 's|^\([^#].*\)|\1\n|gp' "${FILE}"
} }

View File

@ -50,7 +50,7 @@ case "${1}" in
*) *)
if [ ! -z "$(whereis lh_${1})" ] if [ ! -z "$(whereis lh_${1})" ]
then then
exec lh_"${1}" $(echo ${@} | sed -e "s/${1}//") exec lh_"${1}" $(echo ${@} | sed -e "s|${1}||")
else else
Echo_error "no such helper" Echo_error "no such helper"
exit 1 exit 1

View File

@ -123,11 +123,11 @@ Install_file() {
case "${SOURCE}" in case "${SOURCE}" in
lib?*) lib?*)
LETTER="$(echo ${SOURCE} | sed 's/\(....\).*/\1/')" LETTER="$(echo ${SOURCE} | sed 's|\(....\).*|\1|')"
;; ;;
*) *)
LETTER="$(echo ${SOURCE} | sed 's/\(.\).*/\1/')" LETTER="$(echo ${SOURCE} | sed 's|\(.\).*|\1|')"
;; ;;
esac esac
@ -335,11 +335,11 @@ then
case "${SOURCE}" in case "${SOURCE}" in
lib?*) lib?*)
LETTER="$(echo ${SOURCE} | sed 's/\(....\).*/\1/')" LETTER="$(echo ${SOURCE} | sed 's|\(....\).*|\1|')"
;; ;;
*) *)
LETTER="$(echo ${SOURCE} | sed 's/\(.\).*/\1/')" LETTER="$(echo ${SOURCE} | sed 's|\(.\).*|\1|')"
;; ;;
esac esac

View File

@ -54,7 +54,7 @@ Create_lockfile .lock
mkdir -p binary/.disk mkdir -p binary/.disk
ARCHITECTURE="$(echo ${LH_ARCHITECTURE} | sed -e 's# #/#g')" ARCHITECTURE="$(echo ${LH_ARCHITECTURE} | sed -e 's| |/|g')"
DISTRIBUTION="$(echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]')" DISTRIBUTION="$(echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]')"
DISTRIBUTION="${DISTRIBUTION}$(echo ${LH_DISTRIBUTION} | cut -b 2-)" DISTRIBUTION="${DISTRIBUTION}$(echo ${LH_DISTRIBUTION} | cut -b 2-)"
eval VERSION="$`echo VERSION_${LH_DISTRIBUTION}`" eval VERSION="$`echo VERSION_${LH_DISTRIBUTION}`"

View File

@ -189,7 +189,7 @@ then
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} exposedroot" LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} exposedroot"
fi fi
LH_BOOTAPPEND_LIVE="$(echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //')" LH_BOOTAPPEND_LIVE="$(echo ${LH_BOOTAPPEND_LIVE} | sed -e 's| ||')"
# Parameters are listed at: linux/Documentation/kernel-parameters.txt # Parameters are listed at: linux/Documentation/kernel-parameters.txt
FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal" FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal"
@ -199,20 +199,20 @@ FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal"
# Default entries # Default entries
DEFAULT_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')" DEFAULT_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')"
DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})" DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's/vmlinuz-//')" DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')"
Grub_live_entry "live" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}" Grub_live_entry "live" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}"
Grub_live_entry "live (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}" "${FAILSAFE}" Grub_live_entry "live (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}" "${FAILSAFE}"
for KERNEL in chroot/boot/vmlinuz-* for KERNEL in chroot/boot/vmlinuz-*
do do
VERSION="$(basename ${KERNEL} | sed -e 's/vmlinuz-//')" VERSION="$(basename ${KERNEL} | sed -e 's|vmlinuz-||')"
Grub_live_entry "live, kernel ${VERSION}" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}" Grub_live_entry "live, kernel ${VERSION}" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}"
Grub_live_entry "live, kernel ${VERSION} (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}" "${FAILSAFE}" Grub_live_entry "live, kernel ${VERSION} (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}" "${FAILSAFE}"
done done
LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's/binary//g' -e 's#//#/#g')" LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's|binary||g' -e 's|//|/|g')"
# Assembling debian-installer configuration # Assembling debian-installer configuration
if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ] if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ]
@ -238,14 +238,14 @@ then
Grub_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}" Grub_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}"
fi fi
LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g')" LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's|binary||g' -e 's|//|/|g')"
# Assembling memtest configuration # Assembling memtest configuration
if [ -f "${DESTDIR_LIVE}"/memtest ] if [ -f "${DESTDIR_LIVE}"/memtest ]
then then
MEMTEST="title\t\tOther:\nroot" MEMTEST="title\t\tOther:\nroot"
MEMTEST="${MEMTEST}\n\ntitle\t\t${LH_MEMTEST}\nkernel\t\t/$(basename ${DESTDIR_LIVE})/memtest" MEMTEST="${MEMTEST}\n\ntitle\t\t${LH_MEMTEST}\nkernel\t\t/$(basename ${DESTDIR_LIVE})/memtest"
MEMTEST="$(/bin/echo ${MEMTEST} | sed -e 's#//#/#g')" MEMTEST="$(/bin/echo ${MEMTEST} | sed -e 's|//|/|g')"
fi fi
# Copying templates # Copying templates
@ -264,7 +264,7 @@ esac
if [ "${LH_CHROOT_BUILD}" = "disabled" ] if [ "${LH_CHROOT_BUILD}" = "disabled" ]
then then
FILES="$(echo ${FILES} | sed -e 's/chroot//g')" FILES="$(echo ${FILES} | sed -e 's|chroot||g')"
fi fi
# Copying grub # Copying grub
@ -293,18 +293,18 @@ then
rm -f binary/boot/grub/splash.xpm.gz rm -f binary/boot/grub/splash.xpm.gz
# Removing splash entry # Removing splash entry
sed -i -e "s/splashimage.*//" binary/boot/grub/menu.lst sed -i -e "s|splashimage.*||" binary/boot/grub/menu.lst
else else
# Overwriting splash file # Overwriting splash file
cp -f "${LH_GRUB_SPLASH}" binary/boot/grub cp -f "${LH_GRUB_SPLASH}" binary/boot/grub
sed -i -e "s#splashimage.*#splashimage /boot/grub/$(basename ${LH_GRUB_SPLASH})#" binary/boot/grub/menu.lst sed -i -e "s|splashimage.*|splashimage /boot/grub/$(basename ${LH_GRUB_SPLASH})|" binary/boot/grub/menu.lst
fi fi
fi fi
sed -i -e "s#LINUX_LIVE#${LINUX_LIVE}#" -e "s#LINUX_INSTALL#${LINUX_INSTALL}#" -e "s#MEMTEST#${MEMTEST}#" binary/boot/grub/menu.lst sed -i -e "s|LINUX_LIVE|${LINUX_LIVE}|" -e "s|LINUX_INSTALL|${LINUX_INSTALL}|" -e "s|MEMTEST|${MEMTEST}|" binary/boot/grub/menu.lst
sed -i -e "s#LH_BOOTAPPEND_INSTALL#${LH_BOOTAPPEND_INSTALL}#" -e "s#LH_BOOTAPPEND_LIVE#${LH_BOOTAPPEND_LIVE}#" binary/boot/grub/menu.lst sed -i -e "s|LH_BOOTAPPEND_INSTALL|${LH_BOOTAPPEND_INSTALL}|" -e "s|LH_BOOTAPPEND_LIVE|${LH_BOOTAPPEND_LIVE}|" binary/boot/grub/menu.lst
sed -i -e 's/\ $//g' binary/boot/grub/menu.lst sed -i -e 's|\ $||g' binary/boot/grub/menu.lst
# Saving cache # Saving cache
Save_cache cache/packages_binary Save_cache cache/packages_binary

View File

@ -133,7 +133,7 @@ then
fi fi
# Adjusting install templates # Adjusting install templates
ARCHITECTURE="$(echo ${LH_ARCHITECTURE} | sed -e 's# #/#g')" ARCHITECTURE="$(echo ${LH_ARCHITECTURE} | sed -e 's| |/|g')"
DISTRIBUTION="$(echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]')" DISTRIBUTION="$(echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]')"
DISTRIBUTION="${DISTRIBUTION}$(echo ${LH_DISTRIBUTION} | cut -b 2-)" DISTRIBUTION="${DISTRIBUTION}$(echo ${LH_DISTRIBUTION} | cut -b 2-)"
eval VERSION="$`echo VERSION_${LH_DISTRIBUTION}`" eval VERSION="$`echo VERSION_${LH_DISTRIBUTION}`"
@ -157,8 +157,8 @@ then
DEBIAN_TOOLS_TXT="/tools/" DEBIAN_TOOLS_TXT="/tools/"
fi fi
sed -i -e "s#DEBIAN_NAME#${DEBIAN_NAME}#g" -e "s/DEBIAN_DATE/${DEBIAN_DATE}/g" -e "s#DEBIAN_TOOLS#${DEBIAN_TOOLS_HTML}#g" binary/README.html sed -i -e "s|DEBIAN_NAME|${DEBIAN_NAME}|g" -e "s|DEBIAN_DATE|${DEBIAN_DATE}|g" -e "s|DEBIAN_TOOLS|${DEBIAN_TOOLS_HTML}|g" binary/README.html
sed -i -e "s#DEBIAN_NAME#${DEBIAN_NAME}#g" -e "s/DEBIAN_DATE/${DEBIAN_DATE}/g" -e "s#DEBIAN_TOOLS#${DEBIAN_TOOLS_TXT}#g" binary/README.txt sed -i -e "s|DEBIAN_NAME|${DEBIAN_NAME}|g" -e "s|DEBIAN_DATE|${DEBIAN_DATE}|g" -e "s|DEBIAN_TOOLS|${DEBIAN_TOOLS_TXT}|g" binary/README.txt
fi fi
# Creating stage file # Creating stage file

View File

@ -74,11 +74,11 @@ then
case "${SOURCE}" in case "${SOURCE}" in
lib?*) lib?*)
LETTER="$(echo ${SOURCE} | sed 's/\(....\).*/\1/')" LETTER="$(echo ${SOURCE} | sed 's|\(....\).*|\1|')"
;; ;;
*) *)
LETTER="$(echo ${SOURCE} | sed 's/\(.\).*/\1/')" LETTER="$(echo ${SOURCE} | sed 's|\(.\).*|\1|')"
;; ;;
esac esac

View File

@ -185,7 +185,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
if [ "${LH_PACKAGES_LISTS}" = "minimal" ] || [ "${LH_PACKAGES_LISTS}" = "mini" ] if [ "${LH_PACKAGES_LISTS}" = "minimal" ] || [ "${LH_PACKAGES_LISTS}" = "mini" ]
then then
MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -e $(ls chroot/boot/${LINUX}* chroot/boot/initrd.img* chroot/${LINUX}* chroot/initrd.img* | sed 's,chroot/,,g')" MKSQUASHFS_OPTIONS="${MKSQUASHFS_OPTIONS} -e $(ls chroot/boot/${LINUX}* chroot/boot/initrd.img* chroot/${LINUX}* chroot/initrd.img* | sed 's|chroot/||g')"
fi fi
if [ -f config/binary_rootfs/squashfs.sort ] if [ -f config/binary_rootfs/squashfs.sort ]

View File

@ -87,7 +87,7 @@ Syslinux_memtest_entry ()
# Write the menu label if the syslinux menu is being use # Write the menu label if the syslinux menu is being use
MEMTEST="${MEMTEST}\tMENU LABEL ${MENULABEL}\n" MEMTEST="${MEMTEST}\tMENU LABEL ${MENULABEL}\n"
MEMTEST="${MEMTEST}\tkernel ${LIVE_KERNEL_PATH}/${KERNEL}\n" MEMTEST="${MEMTEST}\tkernel ${LIVE_KERNEL_PATH}/${KERNEL}\n"
MEMTEST="$(/bin/echo ${MEMTEST} | sed -e 's#//#/#g')" MEMTEST="$(/bin/echo ${MEMTEST} | sed -e 's|//|/|g')"
} }
Syslinux_live_entry () Syslinux_live_entry ()
@ -182,7 +182,7 @@ Copy_syslinux_templates ()
cp "${TEMPLATES}"/menu/data/* ${DATA_PATH} cp "${TEMPLATES}"/menu/data/* ${DATA_PATH}
# Grab menu binary from chroot # Grab menu binary from chroot
MENUMODULE=$(grep 'menu.c32' ${TEMPLATES}/menu/header.cfg | sed 's,default\s*.*/\(.*menu.c32\)$,\1,g') MENUMODULE=$(grep 'menu.c32' ${TEMPLATES}/menu/header.cfg | sed 's|default\s*.*/\(.*menu.c32\)$|\1|g')
cp chroot/usr/lib/syslinux/"${MENUMODULE}" ${DATA_PATH} cp chroot/usr/lib/syslinux/"${MENUMODULE}" ${DATA_PATH}
fi fi
@ -254,19 +254,19 @@ Configure_syslinux_templates ()
for template_file in ${templates} for template_file in ${templates}
do do
sed -i -e "s@{\$LINUX_LIVE}@${LINUX_LIVE}@" \ sed -i -e "s|{\$LINUX_LIVE}|${LINUX_LIVE}|" \
-e "s@{\$LINUX_INSTALL}@${LINUX_INSTALL}@" \ -e "s|{\$LINUX_INSTALL}|${LINUX_INSTALL}|" \
-e "s@{\$MEMTEST}@${MEMTEST}@" \ -e "s|{\$MEMTEST}|${MEMTEST}|" \
-e "s@{\$LIVE_SCREEN_PATH}@${LIVE_SCREEN_PATH}@" \ -e "s|{\$LIVE_SCREEN_PATH}|${LIVE_SCREEN_PATH}|" \
-e "s@{\$LIVE_DATA_PATH}@${LIVE_DATA_PATH}@" \ -e "s|{\$LIVE_DATA_PATH}|${LIVE_DATA_PATH}|" \
-e "s@{\$LIVE_KERNEL_PATH}@${LIVE_KERNEL_PATH}@" \ -e "s|{\$LIVE_KERNEL_PATH}|${LIVE_KERNEL_PATH}|" \
-e "s@{\$SPLASH}@${SPLASH}@" \ -e "s|{\$SPLASH}@|{SPLASH}|" \
-e "s/{\$LH_DISTRIBUTION}/${LH_DISTRIBUTION}/" \ -e "s|{\$LH_DISTRIBUTION}|${LH_DISTRIBUTION}|" \
-e "s/{\$LH_DATE}/$(date +%Y%m%d)/" \ -e "s|{\$LH_DATE}|$(date +%Y%m%d)|" \
-e "s/{\$LH_MEDIA}/${MEDIA}/" \ -e "s|{\$LH_MEDIA}|${MEDIA}|" \
-e "s/{\$LH_VERSION}/${VERSION}/" \ -e "s|{\$LH_VERSION}|${VERSION}|" \
-e "s/{\$LH_SYSLINUX_TIMEOUT}/${LH_SYSLINUX_TIMEOUT}0/" \ -e "s|{\$LH_SYSLINUX_TIMEOUT}|${LH_SYSLINUX_TIMEOUT}0|" \
-e 's/\ $//g' \ -e 's|\ $||g' \
$template_file $template_file
done done
@ -300,7 +300,7 @@ Configure_syslinux_templates ()
then then
for FILE in ${SCREEN_PATH}/syslinux.cfg ${SCREEN_PATH}/boot.txt for FILE in ${SCREEN_PATH}/syslinux.cfg ${SCREEN_PATH}/boot.txt
do do
sed -i -e 's@/@@' ${FILE} sed -i -e 's|/||' ${FILE}
done done
fi fi
fi fi
@ -468,7 +468,7 @@ then
esac esac
fi fi
LH_BOOTAPPEND_LIVE="$(echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //')" LH_BOOTAPPEND_LIVE="$(echo ${LH_BOOTAPPEND_LIVE} | sed -e 's| ||')"
# Parameters are listed at: linux/Documentation/kernel-parameters.txt # Parameters are listed at: linux/Documentation/kernel-parameters.txt
FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal" FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal"
@ -484,7 +484,7 @@ fi
# Default entries # Default entries
DEFAULT_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')" DEFAULT_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')"
DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})" DEFAULT_KERNEL="$(basename chroot/boot/vmlinuz-*${DEFAULT_FLAVOUR})"
DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's/vmlinuz-//')" DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinuz-||')"
Syslinux_live_entry "live" "${LH_SYSLINUX_MENU_LIVE_ENTRY}" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" Syslinux_live_entry "live" "${LH_SYSLINUX_MENU_LIVE_ENTRY}" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}"
@ -495,7 +495,7 @@ then
if [ "${FLAVOUR}" != "${DEFAULT_FLAVOUR}" ] if [ "${FLAVOUR}" != "${DEFAULT_FLAVOUR}" ]
then then
FLAVOUR_KERNEL="$(basename chroot/boot/vmlinuz-*${FLAVOUR})" FLAVOUR_KERNEL="$(basename chroot/boot/vmlinuz-*${FLAVOUR})"
FLAVOUR_INITRD="initrd.img-$(echo ${FLAVOUR_KERNEL} | sed -e 's/vmlinuz-//')" FLAVOUR_INITRD="initrd.img-$(echo ${FLAVOUR_KERNEL} | sed -e 's|vmlinuz-||')"
Syslinux_live_entry "live-${FLAVOUR}" "${LH_SYSLINUX_MENU_LIVE_ENTRY} ${FLAVOUR}" "${FLAVOUR_KERNEL}" "${FLAVOUR_INITRD}" Syslinux_live_entry "live-${FLAVOUR}" "${LH_SYSLINUX_MENU_LIVE_ENTRY} ${FLAVOUR}" "${FLAVOUR_KERNEL}" "${FLAVOUR_INITRD}"
fi fi
done done

View File

@ -164,7 +164,7 @@ EOM
EOF EOF
rootpartition="$(Chroot 'sh grub.sh' 2>/dev/null | grep -A 1 'find /live/vmlinuz' | grep -v 'find /live/vmlinuz')" rootpartition="$(Chroot 'sh grub.sh' 2>/dev/null | grep -A 1 'find /live/vmlinuz' | grep -v 'find /live/vmlinuz')"
usbdev="$(echo $rootpartition | sed -e 's/,[[:digit:]]//')" usbdev="$(echo $rootpartition | sed -e 's|,[[:digit:]]||')"
echo "Root partition is $rootpartition, device is: $usbdev" echo "Root partition is $rootpartition, device is: $usbdev"
echo "WAITING..." && read WAIT echo "WAITING..." && read WAIT

View File

@ -197,7 +197,7 @@ then
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} exposedroot" LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} exposedroot"
fi fi
LH_BOOTAPPEND_LIVE="$(echo ${LH_BOOTAPPEND_LIVE} | sed -e 's/ //')" LH_BOOTAPPEND_LIVE="$(echo ${LH_BOOTAPPEND_LIVE} | sed -e 's| ||')"
# Parameters are listed at: linux/Documentation/kernel-parameters.txt # Parameters are listed at: linux/Documentation/kernel-parameters.txt
FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=ofonly" FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=ofonly"
@ -207,7 +207,7 @@ FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=ofonly"
# Default entries # Default entries
DEFAULT_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')" DEFAULT_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')"
DEFAULT_KERNEL="$(basename chroot/boot/vmlinux-*${DEFAULT_FLAVOUR})" DEFAULT_KERNEL="$(basename chroot/boot/vmlinux-*${DEFAULT_FLAVOUR})"
DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's/vmlinux-//')" DEFAULT_INITRD="initrd.img-$(echo ${DEFAULT_KERNEL} | sed -e 's|vmlinux-||')"
Yaboot_live_entry "live" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" Yaboot_live_entry "live" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}"
Yaboot_live_entry "live-failsafe" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${FAILSAFE}" Yaboot_live_entry "live-failsafe" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${FAILSAFE}"
@ -217,7 +217,7 @@ then
for KERNEL in chroot/boot/vmlinux-* for KERNEL in chroot/boot/vmlinux-*
do do
KERNEL_IMAGE="$(basename ${KERNEL})" KERNEL_IMAGE="$(basename ${KERNEL})"
KERNEL_VERSION="$(echo ${KERNEL_IMAGE} | sed -e 's/vmlinux-//')" KERNEL_VERSION="$(echo ${KERNEL_IMAGE} | sed -e 's|vmlinux-||')"
INITRD="initrd.img-${KERNEL_VERSION}" INITRD="initrd.img-${KERNEL_VERSION}"
Yaboot_live_entry "live-${KERNEL_VERSION}" "${KERNEL_IMAGE}" "${INITRD}" Yaboot_live_entry "live-${KERNEL_VERSION}" "${KERNEL_IMAGE}" "${INITRD}"
@ -225,7 +225,7 @@ then
done done
fi fi
LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's/binary//g' -e 's#//#/#g')" LINUX_LIVE="$(/bin/echo ${LINUX_LIVE} | sed -e 's|binary||g' -e 's|//|/|g')"
# Assembling debian-installer configuration # Assembling debian-installer configuration
if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ] if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ]
@ -249,7 +249,7 @@ then
Yaboot_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}" Yaboot_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}"
fi fi
LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's/binary//g' -e 's#//#/#g')" LINUX_INSTALL="$(/bin/echo ${LINUX_INSTALL} | sed -e 's|binary||g' -e 's|//|/|g')"
case "${LH_BINARY_IMAGES}" in case "${LH_BINARY_IMAGES}" in
iso|usb-hdd) iso|usb-hdd)
@ -277,9 +277,9 @@ case "${LH_BINARY_IMAGES}" in
fi fi
# Configure yaboot templates # Configure yaboot templates
sed -i -e "s#LINUX_LIVE#${LINUX_LIVE}#" -e "s#LINUX_INSTALL#${LINUX_INSTALL}#" binary/yaboot/yaboot.conf sed -i -e "s|LINUX_LIVE|${LINUX_LIVE}|" -e "s|LINUX_INSTALL|${LINUX_INSTALL}|" binary/yaboot/yaboot.conf
sed -i -e "s#LH_BOOTAPPEND_INSTALL#${LH_BOOTAPPEND_INSTALL}#" -e "s#LH_BOOTAPPEND_LIVE#${LH_BOOTAPPEND_LIVE}#" binary/yaboot/yaboot.conf sed -i -e "s|LH_BOOTAPPEND_INSTALL|${LH_BOOTAPPEND_INSTALL}|" -e "s|LH_BOOTAPPEND_LIVE|${LH_BOOTAPPEND_LIVE}|" binary/yaboot/yaboot.conf
sed -i -e "s/LH_DATE/$(date +%Y%m%d)/" -e "s/LH_VERSION/${VERSION}/" binary/yaboot/boot.msg sed -i -e "s|LH_DATE|$(date +%Y%m%d)|" -e "s|LH_VERSION|${VERSION}|" binary/yaboot/boot.msg
;; ;;
esac esac

View File

@ -133,7 +133,7 @@ then
do do
DIRECTORY="$(dirname ${FILE})" DIRECTORY="$(dirname ${FILE})"
FILE="$(basename ${FILE})" FILE="$(basename ${FILE})"
RELATIVE_PATH="$(echo ${DIRECTORY} | sed 's/[^\/]\+/../g; s/^\///g')" RELATIVE_PATH="$(echo ${DIRECTORY} | sed 's|[^/]\+|..|g; s|^/||g')"
# Touch files in case they don't yet exist # Touch files in case they don't yet exist
mkdir -p chroot/${DIRECTORY} mkdir -p chroot/${DIRECTORY}

View File

@ -98,15 +98,15 @@ rm -f chroot/root/dpkg-selection.txt
# Sort sources # Sort sources
for DSC in chroot/*.dsc for DSC in chroot/*.dsc
do do
SOURCE="$(sed -n 's/^Source: //p' ${DSC})" SOURCE="$(sed -n 's|^Source: ||p' ${DSC})"
case "${SOURCE}" in case "${SOURCE}" in
lib?*) lib?*)
LETTER="$(echo ${SOURCE} | sed 's/\(....\).*/\1/')" LETTER="$(echo ${SOURCE} | sed 's|\(....\).*|\1|')"
;; ;;
*) *)
LETTER="$(echo ${SOURCE} | sed 's/\(.\).*/\1/')" LETTER="$(echo ${SOURCE} | sed 's|\(.\).*|\1|')"
;; ;;
esac esac

View File

@ -54,7 +54,7 @@ Create_lockfile .lock
mkdir -p source/.disk mkdir -p source/.disk
ARCHITECTURE="$(echo ${LH_ARCHITECTURE} | sed -e 's# #/#g')" ARCHITECTURE="$(echo ${LH_ARCHITECTURE} | sed -e 's| |/|g')"
DISTRIBUTION="$(echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]')" DISTRIBUTION="$(echo ${LH_DISTRIBUTION} | cut -b 1 | tr '[a-z]' '[A-Z]')"
DISTRIBUTION="${DISTRIBUTION}$(echo ${LH_DISTRIBUTION} | cut -b 2-)" DISTRIBUTION="${DISTRIBUTION}$(echo ${LH_DISTRIBUTION} | cut -b 2-)"
eval VERSION="$`echo VERSION_${LH_DISTRIBUTION}`" eval VERSION="$`echo VERSION_${LH_DISTRIBUTION}`"