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 ()
{
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_//').${ARCHITECTURE}"
FILES="${FILES} config/$(echo ${PROGRAM} | sed -e 's/^lh_//').${DISTRIBUTION}"
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_||').${DISTRIBUTION}"
for FILE in ${FILES}
do

View File

@ -436,24 +436,24 @@ Set_defaults ()
;;
gnome-desktop)
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_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"
;;
kde-desktop)
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_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"
;;
xfce-desktop)
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_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"
;;
esac
done
LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's/ //g')"
LH_TASKS="$(echo ${LH_TASKS} | sed -e 's/ //g')"
LH_PACKAGES_LISTS="$(echo ${LH_PACKAGES_LISTS} | sed -e 's| ||g')"
LH_TASKS="$(echo ${LH_TASKS} | sed -e 's| ||g')"
# Setting tasks
# LH_TASKS

View File

@ -27,7 +27,7 @@ Losetup ()
${LH_ROOT_COMMAND} ${LH_LOSETUP} "${DEVICE}" "${FILE}"
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)"
Echo_message "Mounting ${DEVICE} with offset ${OFFSET}"

View File

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

View File

@ -34,9 +34,9 @@ Expand_packagelist_file ()
shift
shift
for INCLUDE in $(sed -ne 's/^#<include> \(.*\)/\1/gp' "${FILE}");
for INCLUDE in $(sed -ne 's|^#<include> \(.*\)|\1|gp' "${FILE}");
do
Expand_packagelist "${INCLUDE}" "${@}"
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})" ]
then
exec lh_"${1}" $(echo ${@} | sed -e "s/${1}//")
exec lh_"${1}" $(echo ${@} | sed -e "s|${1}||")
else
Echo_error "no such helper"
exit 1

View File

@ -123,11 +123,11 @@ Install_file() {
case "${SOURCE}" in
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
@ -335,11 +335,11 @@ then
case "${SOURCE}" in
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

View File

@ -54,7 +54,7 @@ Create_lockfile .lock
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="${DISTRIBUTION}$(echo ${LH_DISTRIBUTION} | cut -b 2-)"
eval VERSION="$`echo VERSION_${LH_DISTRIBUTION}`"

View File

@ -189,7 +189,7 @@ then
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} exposedroot"
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
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_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')"
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 (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/${DEFAULT_KERNEL}" "$(basename ${DESTDIR_LIVE})/${DEFAULT_INITRD}" "${FAILSAFE}"
for KERNEL in chroot/boot/vmlinuz-*
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} (fail-safe mode)" "$(basename ${DESTDIR_LIVE})/$(basename ${KERNEL})" "$(basename ${DESTDIR_LIVE})/initrd.img-${VERSION}" "${FAILSAFE}"
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
if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ]
@ -238,14 +238,14 @@ then
Grub_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}"
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
if [ -f "${DESTDIR_LIVE}"/memtest ]
then
MEMTEST="title\t\tOther:\nroot"
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
# Copying templates
@ -264,7 +264,7 @@ esac
if [ "${LH_CHROOT_BUILD}" = "disabled" ]
then
FILES="$(echo ${FILES} | sed -e 's/chroot//g')"
FILES="$(echo ${FILES} | sed -e 's|chroot||g')"
fi
# Copying grub
@ -293,18 +293,18 @@ then
rm -f binary/boot/grub/splash.xpm.gz
# Removing splash entry
sed -i -e "s/splashimage.*//" binary/boot/grub/menu.lst
sed -i -e "s|splashimage.*||" binary/boot/grub/menu.lst
else
# Overwriting splash file
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
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|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/\ $//g' binary/boot/grub/menu.lst
sed -i -e 's|\ $||g' binary/boot/grub/menu.lst
# Saving cache
Save_cache cache/packages_binary

View File

@ -133,7 +133,7 @@ then
fi
# 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="${DISTRIBUTION}$(echo ${LH_DISTRIBUTION} | cut -b 2-)"
eval VERSION="$`echo VERSION_${LH_DISTRIBUTION}`"
@ -157,8 +157,8 @@ then
DEBIAN_TOOLS_TXT="/tools/"
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_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_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
fi
# Creating stage file

View File

@ -74,11 +74,11 @@ then
case "${SOURCE}" in
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

View File

@ -185,7 +185,7 @@ case "${LH_CHROOT_FILESYSTEM}" in
if [ "${LH_PACKAGES_LISTS}" = "minimal" ] || [ "${LH_PACKAGES_LISTS}" = "mini" ]
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
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
MEMTEST="${MEMTEST}\tMENU LABEL ${MENULABEL}\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 ()
@ -182,7 +182,7 @@ Copy_syslinux_templates ()
cp "${TEMPLATES}"/menu/data/* ${DATA_PATH}
# 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}
fi
@ -254,19 +254,19 @@ Configure_syslinux_templates ()
for template_file in ${templates}
do
sed -i -e "s@{\$LINUX_LIVE}@${LINUX_LIVE}@" \
-e "s@{\$LINUX_INSTALL}@${LINUX_INSTALL}@" \
-e "s@{\$MEMTEST}@${MEMTEST}@" \
-e "s@{\$LIVE_SCREEN_PATH}@${LIVE_SCREEN_PATH}@" \
-e "s@{\$LIVE_DATA_PATH}@${LIVE_DATA_PATH}@" \
-e "s@{\$LIVE_KERNEL_PATH}@${LIVE_KERNEL_PATH}@" \
-e "s@{\$SPLASH}@${SPLASH}@" \
-e "s/{\$LH_DISTRIBUTION}/${LH_DISTRIBUTION}/" \
-e "s/{\$LH_DATE}/$(date +%Y%m%d)/" \
-e "s/{\$LH_MEDIA}/${MEDIA}/" \
-e "s/{\$LH_VERSION}/${VERSION}/" \
-e "s/{\$LH_SYSLINUX_TIMEOUT}/${LH_SYSLINUX_TIMEOUT}0/" \
-e 's/\ $//g' \
sed -i -e "s|{\$LINUX_LIVE}|${LINUX_LIVE}|" \
-e "s|{\$LINUX_INSTALL}|${LINUX_INSTALL}|" \
-e "s|{\$MEMTEST}|${MEMTEST}|" \
-e "s|{\$LIVE_SCREEN_PATH}|${LIVE_SCREEN_PATH}|" \
-e "s|{\$LIVE_DATA_PATH}|${LIVE_DATA_PATH}|" \
-e "s|{\$LIVE_KERNEL_PATH}|${LIVE_KERNEL_PATH}|" \
-e "s|{\$SPLASH}@|{SPLASH}|" \
-e "s|{\$LH_DISTRIBUTION}|${LH_DISTRIBUTION}|" \
-e "s|{\$LH_DATE}|$(date +%Y%m%d)|" \
-e "s|{\$LH_MEDIA}|${MEDIA}|" \
-e "s|{\$LH_VERSION}|${VERSION}|" \
-e "s|{\$LH_SYSLINUX_TIMEOUT}|${LH_SYSLINUX_TIMEOUT}0|" \
-e 's|\ $||g' \
$template_file
done
@ -300,7 +300,7 @@ Configure_syslinux_templates ()
then
for FILE in ${SCREEN_PATH}/syslinux.cfg ${SCREEN_PATH}/boot.txt
do
sed -i -e 's@/@@' ${FILE}
sed -i -e 's|/||' ${FILE}
done
fi
fi
@ -468,7 +468,7 @@ then
esac
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
FAILSAFE="noapic noapm nodma nomce nolapic nosmp vga=normal"
@ -484,7 +484,7 @@ fi
# Default entries
DEFAULT_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')"
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}"
@ -495,7 +495,7 @@ then
if [ "${FLAVOUR}" != "${DEFAULT_FLAVOUR}" ]
then
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}"
fi
done

View File

@ -164,7 +164,7 @@ EOM
EOF
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 "WAITING..." && read WAIT

View File

@ -197,7 +197,7 @@ then
LH_BOOTAPPEND_LIVE="${LH_BOOTAPPEND_LIVE} exposedroot"
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
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_FLAVOUR="$(echo ${LH_LINUX_FLAVOURS} | awk '{ print $1 }')"
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-failsafe" "${DEFAULT_KERNEL}" "${DEFAULT_INITRD}" "${FAILSAFE}"
@ -217,7 +217,7 @@ then
for KERNEL in chroot/boot/vmlinux-*
do
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}"
Yaboot_live_entry "live-${KERNEL_VERSION}" "${KERNEL_IMAGE}" "${INITRD}"
@ -225,7 +225,7 @@ then
done
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
if [ "${LH_DEBIAN_INSTALLER}" != "disabled" ]
@ -249,7 +249,7 @@ then
Yaboot_install_entry "autogui" "${VMLINUZ_GI}" "${INITRD_GI}" "auto=true priority=critical ${APPEND_GI}"
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
iso|usb-hdd)
@ -277,9 +277,9 @@ case "${LH_BINARY_IMAGES}" in
fi
# 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#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|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_DATE|$(date +%Y%m%d)|" -e "s|LH_VERSION|${VERSION}|" binary/yaboot/boot.msg
;;
esac

View File

@ -133,7 +133,7 @@ then
do
DIRECTORY="$(dirname ${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
mkdir -p chroot/${DIRECTORY}

View File

@ -98,15 +98,15 @@ rm -f chroot/root/dpkg-selection.txt
# Sort sources
for DSC in chroot/*.dsc
do
SOURCE="$(sed -n 's/^Source: //p' ${DSC})"
SOURCE="$(sed -n 's|^Source: ||p' ${DSC})"
case "${SOURCE}" in
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

View File

@ -54,7 +54,7 @@ Create_lockfile .lock
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="${DISTRIBUTION}$(echo ${LH_DISTRIBUTION} | cut -b 2-)"
eval VERSION="$`echo VERSION_${LH_DISTRIBUTION}`"