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