aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--trunk/src/createpkg11
1 files changed, 4 insertions, 7 deletions
diff --git a/trunk/src/createpkg b/trunk/src/createpkg
index 498a689..a46b911 100644
--- a/trunk/src/createpkg
+++ b/trunk/src/createpkg
@@ -716,13 +716,10 @@ if [ $SIGN_PACKAGES -eq $on ]; then
fi
if [ ! -z "$SIGN_PACKAGES_USER" ]; then
- if tmpfile="`su $SIGN_PACKAGES_USER -c "mktemp $TMP/createpkg_sig.XXXXXX"`"; then
- su $SIGN_PACKAGES_USER -c "gpg --use-agent --armor -sb -u $SIGN_KEYID -o $tmpfile $PACKAGES_DIR/$PKG_NAME"
- cp $tmpfile $PACKAGES_DIR/$PKG_NAME.asc
- su $SIGN_PACKAGES_USER -c "rm -f $tmpfile"
- else
- echo "Error signing package: could not create tmp file."
- fi
+ rm -f $TMP/$PKG_NAME.asc
+ su $SIGN_PACKAGES_USER -c "gpg --use-agent --armor -sb -u $SIGN_KEYID -o $TMP/$PKG_NAME.asc $PACKAGES_DIR/$PKG_NAME"
+ cp $TMP/$PKG_NAME.asc $PACKAGES_DIR/$PKG_NAME.asc
+ rm -f $TMP/$PKG_NAME.asc
else
gpg --use-agent --armor -sb -u $SIGN_KEYID $PACKAGES_DIR/$PKG_NAME
fi