Ignore:
Timestamp:
Sep 26, 2010, 6:40:18 PM (14 years ago)
Author:
andersk
Message:
Avoid xargs (so stdin works), and use grep instead of parsing diff output
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/fc13-dev/server/doc/install-howto.sh

    r1672 r1676  
    143143# several minutes of dependency resolution until it decides that
    144144# it can't install /one/ package.
    145     cat packages.txt | xargs yum install -y --skip-broken
     145    yum install -y --skip-broken $(cat packages.txt)
    146146
    147147# Check which packages are installed on your new server that are not
     
    152152    diff -u packages.txt newpackages.txt | grep -v kernel | less
    153153    # here's a cute script that removes all extra packages
    154     diff -u packages.txt newpackages.txt | grep -v kernel | grep '+' | cut -c2- | grep -v "@" | grep -v "++" | xargs yum erase -y
     154    yum erase -y $(grep -Fxvf packages.txt newpackages.txt)
    155155
    156156# We need an upstream version of cgi which we've packaged ourselves, but
     
    202202#       package, so... don't use that RPM yet
    203203gem list --no-version > gem.txt
    204     gem list --no-version | diff gem.txt - | grep "<" | cut -c3- | xargs gem install
     204    gem install $(gem list --no-version | grep -Fxvf - gem.txt)
    205205# - Look at `pear list` for Pear fruits (or whatever they're called).
    206206#   Yet again, 'yum search' for RPMs before resorting to 'pear install'.  Note
     
    210210    pear config-set preferred_state beta
    211211    pear channel-update pear.php.net
    212     pear list | tail -n +4 | cut -f 1 -d " " | diff pear.txt - | grep "<" | cut -c3- | xargs pear install
     212    pear install $(pear list | tail -n +4 | cut -f 1 -d " " | grep -Fxvf - pear.txt)
    213213# - Look at `pecl list` for PECL things.  'yum search', and if you must,
    214214#   'pecl install' needed items. If it doesn't work, try 'pear install
    215215#   pecl/foo' or 'pecl install foo-beta' or those two combined.
    216216pecl list | tail -n +4 | cut -f 1 -d " " > pecl.txt
    217     pecl list | tail -n +4 | cut -f 1 -d " " | diff pecl.txt - | grep "<" | cut -c3- | xargs pecl install --nodeps
     217    pecl install --nodeps $(pecl list | tail -n +4 | cut -f 1 -d " " | grep -Fxvf - pecl.txt)
    218218
    219219# Setup some Python config
Note: See TracChangeset for help on using the changeset viewer.