]> git.wh0rd.org - home.git/blame - .bin/ebuild-bump
tweak gentoo stuff
[home.git] / .bin / ebuild-bump
CommitLineData
1afdf944
MF
1#!/bin/bash
2
1afdf944
MF
3cmd=""
4case $1 in
5 -u|--unpack) cmd="unpack";;
6 -*) echo "error: uknown option $1"; exit 1;;
7esac
8
9src=${1%.ebuild}.ebuild ; shift
10dst=${1%.ebuild}.ebuild ; shift
11
12set -e
13
14if [[ ! -e $src ]] ; then
15 echo "source ebuild not found '$src'" 1>&2
16 exit 1
17fi
18
19cp $src $dst
20
21case $cmd in
22 u|unpack) commands="clean setup unpack" ;;
23 *) commands="manifest clean setup unpack compile install" ;;
24esac
25
26ekeyword ~all $dst
27
28ebuild $dst $commands
29
30cvs add $dst
31
32if [[ -z $* ]] ; then
33 er 'Version bump.'
34else
35 er "Version bump $*."
36fi