All pastes #940951 Raw Edit

Untitled

public shellscript v1 · immutable
·published 2008-03-13 12:38 UTC
rendered paste body
#!/bin/bashOVERLAY=/home/randk/.portage-local/CATEGORY=$1EBUILD=$2PKGDIR=$(echo $EBUILD | awk -F- '{print $1 "-" $2}') # Usage - displays if full argument isn't given.if [[ -z "$EBUILD" ]]; then    echo "ebuild2overlay <category> <package.ebuild>"    exit;fi# Category directory exists?  If not create directory.cd $OVERLAYif ls | grep "$CATEGORY" > /dev/null; then    echo " * Category directory already created."; else    mkdir "$CATEGORY"    echo " * Category directory created."fi# Package directory exists?  If not create directory.cd $OVERLAY/$CATEGORYif ls | grep "$PKGDIR" > /dev/null; then    echo " * Package directory already created."; else    mkdir "$PKGDIR"    echo " * Package directory created."fi# Move ebuild to overlay, keyword ppc arch, digestcd $OVERLAY$CATEGORY/$PKGDIRmv ~/Desktop/"$EBUILD" .ekeyword ~ppc "$EBUILD"sudo ebuild "$EBUILD" digest