logo       
Google Custom Search
    AddThis Social Bookmark Button
-->

CVS: moonbase/archive/rpmunpack/plugin.d unpack-rpm.plugin, NONE, 1.1: msg#00083

Subject: CVS: moonbase/archive/rpmunpack/plugin.d unpack-rpm.plugin, NONE, 1.1
Update of /var/cvs/lunar/moonbase/archive/rpmunpack/plugin.d
In directory 
espresso.foo-projects.org:/tmp/cvs-serv14680/archive/rpmunpack/plugin.d

Added Files:
        unpack-rpm.plugin 
Log Message:
Merging in module-dependent plugins


--- NEW FILE: unpack-rpm.plugin ---
#!/bin/bash
#############################################################
#                                                           #
# unpack-rpm.plugin - generic plugin that unpacks rpmfiles  #
#                                                           #
#############################################################
#                                                           #
# Copyright 2005 by Auke Kok under GPLv2                    #
#                                                           #
#############################################################


plugin_unpack_rpm() {
        case $1 in
                *.rpm)
                        if [ ! -x /usr/bin/rpmunpack ]; then
                                message "${PROBLEM_COLOR}! Cannot unpack rpm 
files without ${MODULE_COLOR}rpmunpack${DEFAULT_COLOR}${PROBLEM_COLOR} 
installed${DEFAULT_COLOR}";
                                exit 1
                        fi
                        debug_msg "Unpacking rpm file \"$1\""
                        rpmunpack < $1 | gzip -d | cpio -idm || return 1
                        ;;
                *)
                        # fallback: we don't know what to do!
                        return 2
                        ;;
        esac
        # return success!
        return 0
}


plugin_register SOURCE_UNPACK plugin_unpack_rpm


<Prev in Thread] Current Thread [Next in Thread>