commit: a8c3ab7ccce6f3eb43aab4722168bf4e49dd5d9b
Author: Brian Dolbec <dolsen <AT> gentoo <DOT> org>
AuthorDate: Sun Mar 23 01:48:51 2014 +0000
Commit: Brian Dolbec <brian.dolbec <AT> gmail <DOT> com>
CommitDate: Sun Mar 23 01:48:51 2014 +0000
URL:
http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=a8c3ab7c
makerelease.sh: Add --user option for the scp upload.
---
mkrelease.sh | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
diff --git a/mkrelease.sh b/mkrelease.sh
index 94e90f7..2410b02 100755
--- a/mkrelease.sh
+++ b/mkrelease.sh
@@ -9,9 +9,10 @@ USE_TAG=false
CHANGELOG_REVISION=
UPLOAD_LOCATION=
RUNTESTS=false
+USER=
usage() {
- echo "Usage: ${0##*/} [--changelog-rev <tree-ish>] [-t|--tag]
[-u|--upload <location>] [--runtests] <version>"
+ echo "Usage: ${0##*/} [--changelog-rev <tree-ish>] [-t|--tag]
[-u|--upload <location>] [--user <username>] [--runtests] <version>"
exit ${1:-0}
}
@@ -20,7 +21,7 @@ die() {
usage 1
}
-ARGS=$(getopt -o htu: --long help,changelog-rev:,runtests,tag,upload: \
+ARGS=$(getopt -o htu: --long help,changelog-rev:,runtests,tag,upload:,user: \
-n "${0##*/}" -- "$@")
[ $? != 0 ] && die "initialization error"
@@ -40,6 +41,10 @@ while true; do
UPLOAD_LOCATION=$2
shift 2
;;
+ --user)
+ USER=$2"@"
+ shift 2
+ ;;
-h|--help)
usage
;;
@@ -127,8 +132,8 @@ if [[ -n ${DISTDIR} && -d ${DISTDIR} && -w ${DISTDIR} ]] ;
then
fi
if [[ -n ${UPLOAD_LOCATION} ]] ; then
- echo ">>> Uploading ${RELEASE_TARBALL} to ${UPLOAD_LOCATION}"
- scp "${RELEASE_TARBALL}" "dev.gentoo.org:${UPLOAD_LOCATION}" || die
"upload failed"
+ echo ">>> Uploading ${RELEASE_TARBALL} to
${USER}dev.gentoo.org:${UPLOAD_LOCATION}"
+ scp "${RELEASE_TARBALL}" "${USER}dev.gentoo.org:${UPLOAD_LOCATION}" ||
die "upload failed"
else
du -h "${RELEASE_TARBALL}"
fi