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