summaryrefslogtreecommitdiffstats
path: root/bin/pbuild.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pbuild.sh')
-rwxr-xr-xbin/pbuild.sh35
1 files changed, 33 insertions, 2 deletions
diff --git a/bin/pbuild.sh b/bin/pbuild.sh
index a2bc7cb..f329c2a 100755
--- a/bin/pbuild.sh
+++ b/bin/pbuild.sh
@@ -43,8 +43,8 @@ esac
Parameters()
{
- LONG_OPTIONS="auto,build:,distribution:,interactive,package:,tag:,"
- OPTIONS="a,b:,d:,i,p:,t:,"
+ LONG_OPTIONS="auto,build:,distribution:,interactive,package:,tag:,upload,"
+ OPTIONS="a,b:,d:,i,p:,t:,u,"
PARAMETERS="$(getopt --longoptions ${LONG_OPTIONS} --name=${PROGRAM} --options ${OPTIONS} --shell sh -- ${@})"
@@ -89,6 +89,11 @@ Parameters()
shift 2
;;
+ -u|--upload)
+ UPLOAD="true"
+ shift
+ ;;
+
--)
shift
break
@@ -222,6 +227,19 @@ do
dpkg-source -b "${TARGET}-${UPSTREAM_VERSION}"
rm -rf "${TARGET}-${UPSTREAM_VERSION}"
+
+ # upload
+ case "${UPLOAD}" in
+ true)
+ FILES="$(sed -e '1,/^Files:$/ d' ${TARGET}_${SOURCE_VERSION}*.dsc | awk '/^ / { print $5 }')"
+
+ for FILE in ${FILES}
+ do
+ rsync -aP "${FILE}" apt.progress-linux.org::upload
+ rm -f "${FILE}"
+ done
+ ;;
+ esac
;;
binary*)
@@ -320,6 +338,19 @@ do
cd "${OLDPWD}"
rm -rf "${SOURCE}"
+
+ # upload
+ case "${UPLOAD}" in
+ true)
+ FILES="$(sed -e '1,/^Files:$/ d' ${TARGET}_${SOURCE_VERSION}_*.changes | awk '/^ / { print $5 }')"
+
+ for FILE in ${FILES}
+ do
+ rsync -aP "${FILE}" apt.progress-linux.org::upload
+ rm -f "${FILE}"
+ done
+ ;;
+ esac
;;
esac
done