diff options
author | Daniel Baumann <daniel@debian.org> | 2008-01-15 08:25:29 +0100 |
---|---|---|
committer | Daniel Baumann <daniel@debian.org> | 2011-03-09 18:35:39 +0100 |
commit | 342d2870ebe66fc987bbb6523c67885631eb0e00 (patch) | |
tree | 6d9332db2197bb7b54e3e3b97f83474cd2430e56 | |
parent | e8e4001524ee6fa47ce7ffe06da39b6d43e065d2 (diff) | |
download | live-build-342d2870ebe66fc987bbb6523c67885631eb0e00.zip live-build-342d2870ebe66fc987bbb6523c67885631eb0e00.tar.gz |
Consistently using the pipe as seperator in sed commands now.
-rwxr-xr-x | functions/conffile.sh | 6 | ||||
-rwxr-xr-x | functions/defaults.sh | 16 | ||||
-rwxr-xr-x | functions/losetup.sh | 2 | ||||
-rwxr-xr-x | functions/packages.sh | 2 | ||||
-rwxr-xr-x | functions/packageslists.sh | 4 | ||||
-rwxr-xr-x | helpers/lh | 2 | ||||
-rwxr-xr-x | helpers/lh_binary_debian-installer | 8 | ||||
-rwxr-xr-x | helpers/lh_binary_disk | 2 | ||||
-rwxr-xr-x | helpers/lh_binary_grub | 24 | ||||
-rwxr-xr-x | helpers/lh_binary_includes | 6 | ||||
-rwxr-xr-x | helpers/lh_binary_local-packageslists | 4 | ||||
-rwxr-xr-x | helpers/lh_binary_rootfs | 2 | ||||
-rwxr-xr-x | helpers/lh_binary_syslinux | 38 | ||||
-rwxr-xr-x | helpers/lh_binary_usb-hdd | 2 | ||||
-rwxr-xr-x | helpers/lh_binary_yaboot | 16 | ||||
-rwxr-xr-x | helpers/lh_chroot_hacks | 2 | ||||
-rwxr-xr-x | helpers/lh_source_debian | 6 | ||||
-rwxr-xr-x | helpers/lh_source_disk | 2 |
18 files changed, 72 insertions, 72 deletions
diff --git a/functions/conffile.sh b/functions/conffile.sh index f60abe2..d0291e2 100755 --- a/functions/conffile.sh +++ b/functions/conffile.sh @@ -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 diff --git a/functions/defaults.sh b/functions/defaults.sh index a3ab9a1..e86163b 100755 --- a/functions/defaults.sh +++ b/functions/defaults.sh @@ -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 diff --git a/functions/losetup.sh b/functions/losetup.sh index b2a4f06..c3e90bc 100755 --- a/functions/losetup.sh +++ b/functions/losetup.sh @@ -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}" diff --git a/functions/packages.sh b/functions/packages.sh index dadb007..645b6c4 100755 --- a/functions/packages.sh +++ b/functions/packages.sh @@ -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 diff --git a/functions/packageslists.sh b/functions/packageslists.sh index 1ef64e3..cdec22c 100755 --- a/functions/packageslists.sh +++ b/functions/packageslists.sh @@ -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}" } @@ -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 diff --git a/helpers/lh_binary_debian-installer b/helpers/lh_binary_debian-installer index 37db5a6..050f48f 100755 --- a/helpers/lh_binary_debian-installer +++ b/helpers/lh_binary_debian-installer @@ -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 diff --git a/helpers/lh_binary_disk b/helpers/lh_binary_disk index 36f1984..88533e0 100755 --- a/helpers/lh_binary_disk +++ b/helpers/lh_binary_disk @@ -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}`" diff --git a/helpers/lh_binary_grub b/helpers/lh_binary_grub index 5a8cc7c..1d33ba8 100755 --- a/helpers/lh_binary_grub +++ b/helpers/lh_binary_grub @@ -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 diff --git a/helpers/lh_binary_includes b/helpers/lh_binary_includes index b4230a8..c2b2399 100755 --- a/helpers/lh_binary_includes +++ b/helpers/lh_binary_includes @@ -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 diff --git a/helpers/lh_binary_local-packageslists b/helpers/lh_binary_local-packageslists index 7355174..011386e 100755 --- a/helpers/lh_binary_local-packageslists +++ b/helpers/lh_binary_local-packageslists @@ -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 diff --git a/helpers/lh_binary_rootfs b/helpers/lh_binary_rootfs index 7871d77..2bd2a1f 100755 --- a/helpers/lh_binary_rootfs +++ b/helpers/lh_binary_rootfs @@ -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 ] diff --git a/helpers/lh_binary_syslinux b/helpers/lh_binary_syslinux index eff8d83..a217799 100755 --- a/helpers/lh_binary_syslinux +++ b/helpers/lh_binary_syslinux @@ -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 diff --git a/helpers/lh_binary_usb-hdd b/helpers/lh_binary_usb-hdd index 3875cae..44eaac5 100755 --- a/helpers/lh_binary_usb-hdd +++ b/helpers/lh_binary_usb-hdd @@ -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 diff --git a/helpers/lh_binary_yaboot b/helpers/lh_binary_yaboot index b02b221..2c51a66 100755 --- a/helpers/lh_binary_yaboot +++ b/helpers/lh_binary_yaboot @@ -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 diff --git a/helpers/lh_chroot_hacks b/helpers/lh_chroot_hacks index 5d9a4ac..1dd4850 100755 --- a/helpers/lh_chroot_hacks +++ b/helpers/lh_chroot_hacks @@ -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} diff --git a/helpers/lh_source_debian b/helpers/lh_source_debian index d1d025c..5e7fc89 100755 --- a/helpers/lh_source_debian +++ b/helpers/lh_source_debian @@ -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 diff --git a/helpers/lh_source_disk b/helpers/lh_source_disk index 433a710..509af74 100755 --- a/helpers/lh_source_disk +++ b/helpers/lh_source_disk @@ -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}`" |