summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-03-20 02:54:55 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-20 02:54:55 -0300
commitd9370ed5272b04be0231d576c77a21b402105b49 (patch)
treeab0f98424240c2b4577d6f3c87c450f250e6cf6b
parent9f85fbc44d99a2327bf2fb9be850bb9844c8c8c7 (diff)
downloadmediapointer-dvb-s2-d9370ed5272b04be0231d576c77a21b402105b49.tar.gz
mediapointer-dvb-s2-d9370ed5272b04be0231d576c77a21b402105b49.tar.bz2
mailimport: print better error msg end exit with -1 if error
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rwxr-xr-xmailimport10
1 files changed, 6 insertions, 4 deletions
diff --git a/mailimport b/mailimport
index 8ed624179..94f0d53c4 100755
--- a/mailimport
+++ b/mailimport
@@ -120,7 +120,7 @@ apply_patch () {
patch -s -t -p1 -l -N -d $pdir -i $next
if [ "$?" != "0" ]; then
echo "*** ERROR at: patch -s -t -p1 -l -N -d $pdir -i $next"
- exit
+ exit -1
fi
make cardlist
make whitespace
@@ -130,7 +130,8 @@ apply_patch () {
hg addremove `diffstat -p1 -l $next`
if [ "$?" != "0" ]; then
echo "*** ERROR at hg addremove"
- exit
+ echo hg addremove `diffstat -p1 -l $next`
+ exit -1
fi
# Commit the changed files
@@ -150,8 +151,9 @@ apply_patch () {
if [ "$?" != "0" ]; then
echo "*** ERROR at hg commit"
+ echo hg commit -d \"$date\" -u \"$committer\" -m "<msg>" $CARDLIST $FILES
cd $cur
- exit
+ exit -1
fi
cd $cur
fi
@@ -250,7 +252,7 @@ DIR="$TMPDIR/mailimport$$"
mkdir $DIR
if [ "$?" != "0" ]; then
echo "*** Error at mkdir $DIR"
- exit;
+ exit -1;
fi
trap "rm -rf $DIR" EXIT