From b58c75077584a025d89ddc92a094d128c055d4ca Mon Sep 17 00:00:00 2001 From: Jose V Beneyto Date: Thu, 1 Nov 2012 17:45:33 +0000 Subject: [PATCH] Modified setup-helper script to handle extra collections --- filesystem/setup-helper | 56 +++++++++++++++++++++++++---------------- 1 file changed, 35 insertions(+), 21 deletions(-) mode change 100644 => 100755 filesystem/setup-helper diff --git a/filesystem/setup-helper b/filesystem/setup-helper old mode 100644 new mode 100755 index 348fb08..37101a7 --- a/filesystem/setup-helper +++ b/filesystem/setup-helper @@ -71,9 +71,9 @@ remove_packages() { inject_packages() { for package in $@; do - pkg="`find core opt xorg \( -name \"${package}#*.pkg.tar.gz\" -o -name \"${package}#*.pkg.tar.bz2\" -o -name \"${package}#*.pkg.tar.xz\" \)&2> /dev/null`" + pkg="`find core $EXTRA_COLLECTIONS \( -name \"${package}#*.pkg.tar.gz\" -o -name \"${package}#*.pkg.tar.bz2\" -o -name \"${package}#*.pkg.tar.xz\" \)&2> /dev/null`" if [ -z "$pkg" ]; then - echo " ERROR: package $package not found on ISO" + echo " ERROR: package $package not found on CRUX media installer" else if [ -z `is_installed $package` ]; then echo "Package injected: $package" @@ -93,6 +93,14 @@ if [ -z "$1" ]; then exit -1 fi +EXTRA_COLLECTIONS="" +for i in /media/crux/*; do. + if [ -d $i ]; then + if [ "$i" != "core" ] && [ "$i" != "kernel" ]; then + EXTRA_COLLECTIONS="$EXTRA_COLLECTIONS $i" + fi + fi +done ##### # 2.7 -> 2.8 ##### echo "* CRUX 2.7 -> 2.8 setup-helper" @@ -101,32 +109,38 @@ rename_packages "util-linux-ng:util-linux" remove_packages module-init-tools eject inject_packages kmod tzdata util-linux -if [ `is_installed glib` ]; then - inject_packages libffi -fi +if grep -q opt $EXTRA_COLLECTIONS; then -if [ `is_installed wpa_supplicant` ]; then - inject_packages libnl -fi + if [ `is_installed glib` ]; then + inject_packages libffi + fi -if [ `is_installed xorg-xcb-util` ]; then - inject_packages xorg-xcb-util-image xorg-xcb-util-keysyms xorg-xcb-util-renderutil xorg-xcb-util-wm + if [ `is_installed wpa_supplicant` ]; then + inject_packages libnl + fi fi -if [ `is_installed xorg-xf86-input-evdev` ]; then - inject_packages mtdev -fi +if grep -q xorg $EXTRA_COLLECTIONS; then -if [ `is_installed xorg-xf86-input-synaptics` ]; then - inject_packages mtdev -fi + if [ `is_installed xorg-xcb-util` ]; then + inject_packages xorg-xcb-util-image xorg-xcb-util-keysyms xorg-xcb-util-renderutil xorg-xcb-util-wm + fi -if [ `is_installed firefox` ]; then - inject_packages nspr nss sqlite3 -fi + if [ `is_installed xorg-xf86-input-evdev` ]; then + inject_packages mtdev + fi + + if [ `is_installed xorg-xf86-input-synaptics` ]; then + inject_packages mtdev + fi + + if [ `is_installed firefox` ]; then + inject_packages nspr nss sqlite3 + fi -if [ `is_installed mesa3d` ]; then - inject_packages glu + if [ `is_installed mesa3d` ]; then + inject_packages glu + fi fi # force replacement of /etc/mtab with symlink -- 2.26.2