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