summaryrefslogtreecommitdiffstats
path: root/bin/pbuild.sh
diff options
context:
space:
mode:
Diffstat (limited to 'bin/pbuild.sh')
-rwxr-xr-xbin/pbuild.sh57
1 files changed, 30 insertions, 27 deletions
diff --git a/bin/pbuild.sh b/bin/pbuild.sh
index 9835141..b736919 100755
--- a/bin/pbuild.sh
+++ b/bin/pbuild.sh
@@ -43,8 +43,8 @@ esac
Parameters()
{
- LONG_OPTIONS="auto,build:,distribution:,interactive,package:,tag:,upload,"
- OPTIONS="a,b:,d:,i,p:,t:,u,"
+ LONG_OPTIONS="auto,build:,distribution:,interactive,nocheck,package:,tag:,upload,"
+ OPTIONS="a,b:,d:,i,n,p:,t:,u,"
PARAMETERS="$(getopt --longoptions ${LONG_OPTIONS} --name=${PROGRAM} --options ${OPTIONS} --shell sh -- ${@})"
@@ -79,6 +79,11 @@ Parameters()
shift 1
;;
+ -n|--nocheck)
+ NOCHECK="true"
+ shift 1
+ ;;
+
-p|--package)
PACKAGE="$(echo ${2} | sed -e 's|/$||g')"
shift 2
@@ -247,13 +252,10 @@ do
# upload
case "${UPLOAD}" in
true)
- FILES="$(sed -e '1,/^Files:$/ d' ${TARGET}_${SOURCE_VERSION}.dsc | grep -v '^\ \ ' | grep '^\ ' | awk '/^ / { print $3 }')"
+ FILES="$(sed -e '1,/^Files:$/ d' ${TARGET}_${SOURCE_VERSION}.dsc | sed -e '/^[0-1a-zA-Z]/,$d' | awk '{ print $3 }')"
- for FILE in ${FILES} ${TARGET}_${SOURCE_VERSION}.dsc
- do
- rsync -aP "${FILE}" apt.progress-linux.org::upload
- rm -f "${FILE}"
- done
+ rsync -aP "${FILES}" ${TARGET}_${SOURCE_VERSION}.dsc apt.progress-linux.org::upload
+ rm -f "${FILES}" ${TARGET}_${SOURCE_VERSION}.dsc
;;
esac
;;
@@ -310,19 +312,23 @@ do
mv "${TARGET}" "${SOURCE}"
cd "${SOURCE}"
- # disable tests
- for RULE in dh_auto_test dh_auto_test-arch dh_auto_test-indep \
- override_dh_auto_test override_dh_auto_test-arch override_dh_auto_test-indep \
- execute_before_dh_auto_test execute_before_dh_auto_test-arch execute_before_dh_auto_test-indep \
- execute_after_dh_auto_test execute_after_dh_auto_test-arch execute_after_dh_auto_test-indep
- do
- if grep -qs "^${RULE}:" debian/rules
- then
- sed -i -e "s|^${RULE}:|disabled_${RULE}:|" debian/rules
- else
- echo "${RULE}:" >> debian/rules
- fi
- done
+ case "${NOCHECK}" in
+ true)
+ # disable tests
+ for RULE in dh_auto_test dh_auto_test-arch dh_auto_test-indep \
+ override_dh_auto_test override_dh_auto_test-arch override_dh_auto_test-indep \
+ execute_before_dh_auto_test execute_before_dh_auto_test-arch execute_before_dh_auto_test-indep \
+ execute_after_dh_auto_test execute_after_dh_auto_test-arch execute_after_dh_auto_test-indep
+ do
+ if grep -qs "^${RULE}:" debian/rules
+ then
+ sed -i -e "s|^${RULE}:|disabled_${RULE}:|" debian/rules
+ else
+ echo "${RULE}:" >> debian/rules
+ fi
+ done
+ ;;
+ esac
case "${AUTO}" in
true)
@@ -358,13 +364,10 @@ do
# upload
case "${UPLOAD}" in
true)
- FILES="$(sed -e '1,/^Files:$/ d' ${TARGET}_${SOURCE_VERSION}_*.changes | grep -v '^\ \ ' | grep '^\ ' | awk '/^ / { print $5 }')"
+ FILES="$(sed -e '1,/^Files:$/ d' ${TARGET}_${SOURCE_VERSION}_*.changes | sed -e '/^[0-1a-zA-Z]/,$d' | awk '{ print $5 }')"
- for FILE in ${FILES} ${TARGET}_${SOURCE_VERSION}_*.changes
- do
- rsync -aP "${FILE}" apt.progress-linux.org::upload
- rm -f "${FILE}"
- done
+ rsync -aP "${FILES}" ${TARGET}_${SOURCE_VERSION}_*.changes
+ rm -f "${FILES}" ${TARGET}_${SOURCE_VERSION}_*.changes
;;
esac
;;