#!/bin/bash # get "er" shortcut source ~/.profile.d/gentoo.sh cmd="" case $1 in -u|--unpack) cmd="unpack";; -*) echo "error: uknown option $1"; exit 1;; esac src=${1%.ebuild}.ebuild ; shift dst=${1%.ebuild}.ebuild ; shift set -e if [[ ! -e $src ]] ; then echo "source ebuild not found '$src'" 1>&2 exit 1 fi cp $src $dst case $cmd in u|unpack) commands="clean setup unpack" ;; *) commands="manifest clean setup unpack compile install" ;; esac ekeyword ~all $dst ebuild $dst $commands cvs add $dst if [[ -z $* ]] ; then er 'Version bump.' else er "Version bump $*." fi