OK I don't really have a good title yet but I figure I can post works in progress and other tips I've come across or other interesting things.
A script to extract RPMs
Tags extract rpm
Since my blog is a guide to random things... here is a nice bash script to extract RPMs to a directory named after them self where the RPM can be located anywhere... that is, relative to the current directory or exact path
Code:
#!/bin/sh # # This script is in the public domain. # # A simple script to extract RPM files automagically # Honestly... why isn't this feature built into # the rpm tools?! unless I missed something... RPM="$1" CWD=`pwd` DESTDIR="$CWD/"`basename $RPM .rpm` mkdir "$DESTDIR" cd "$DESTDIR" if [ -f "$RPM" ]; then FILE="$RPM" elif [ -f "$CWD/$RPM" ]; then FILE="$CWD/$RPM" fi rpm2cpio $FILE | cpio -idmv
Total Comments 1
Comments
-
thankyou.
Posted 12-01-2008 at 02:56 AM by hasanatizaz