Re: Newbie multiple packages question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



A tiny, tiny, nit.

Olivier Thauvin wrote:
> cp -ar $INSTALL_ROOT/node1 $INSTALL_ROOT/

The -a option to cp includes -r.  So you really only need 'cp -a' and
that is all.

> rm -fr $INSTALL_ROOT/node1
> find $INSTALL_ROOT/node2 | sed 's/^.*node2//' > node2.list
> cp -ar $INSTALL_ROOT/node1 $INSTALL_ROOT/
> rm -fr $INSTALL_ROOT/node1
> 
> %files node1 -f node1.list
> 
> %files node2 -f node2.list
> 
> Well here the idea, now adjust to have a faster to maintain code.
> untested, especially sed code.
> 
> the find, cp, mv would probably goes into a loop:
> 
> for node in node1 node2; do
> find $INSTALL_ROOT/${node} | sed "s/^.*${node}//" > ${node}.list
> done

A clever hack!  Thanks for sharing that.

Bob


[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux