Leave a comment

Ebuild 2 Overlay

As I like to try out new programs all the time, a process that got dull repeating was getting an ebuild and then putting in it my local overlay. Doesn’t sound like alot? Well, first there is seeing if the category exists, creating that category, moving the ebuild, keywording the ebuild, and then creating a Manifest.

Well, this just got tedious so I realized I was doing this enough times to justify making a small script that automates the details.

#!/bin/bash

# Fixes required:
# Directory check for category can fail for incomplete phrease - "app-edi"
# Catagory Match

CATEGORY=$1
PACKAGE=$2
#CATEGORYMATCH=$(ls ~/.portage/ = $1)

if [[ -z "$PACKAGE" ]]; then
    echo "ebuild-overlay <category> <package>"
    exit;
fi

cd ~/.portage-local/

if ls | grep "$1" > /dev/null; then
    echo "Category directory already created."; else
    mkdir $1
fi

cd ~/.portage-local/$1/
mkdir $2

cd ~/.portage-local/$1/$2/
mv ~/Desktop/$2* .
ekeyword ~ppc $2*
sudo ebuild $2* digest



About these ads

About Gen2ly

<3's linux

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 52 other followers

%d bloggers like this: