Skip to content
Snippets Groups Projects

add option to bsmailusers to disable email confirmation check

Merged Ben Morrice requested to merge emailcheckdisable into master
1 file
+ 17
9
Compare changes
  • Side-by-side
  • Inline
+ 17
9
@@ -15,6 +15,7 @@ OPTIONS:
-t date Date the packages have been built : e.g 25-12-2012
-w Update web pages
-e Edit email with \$EDITOR before sending
-c Disable email confirmation check
EOF
}
@@ -35,11 +36,12 @@ SYNC=""
DRYRUN=""
DISTS=""
SEND=""
SENDCONFIRM=1
WEB=""
optiond=false
optionr=false
while getopts “:hbnsewd:r:t:” OPTION
while getopts “:hbnsewcd:r:t:” OPTION
do
case $OPTION in
h)
@@ -69,6 +71,9 @@ do
w)
WEB=1
;;
c)
SENDCONFIRM=0
;;
?)
exit 1
;;
@@ -259,14 +264,17 @@ do
then
$EDITOR $MAILTMP
fi
echo "Would you like to send the email ? (yes/no)"
read cancontinue
echo
if [ "$cancontinue" != "yes" ]
then
echo "Email has not been sent."
exit 1
fi
if [ $SENDCONFIRM -eq 1 ]
then
echo "Would you like to send the email ? (yes/no)"
read cancontinue
echo
if [ "$cancontinue" != "yes" ]
then
echo "Email has not been sent."
exit 1
fi
fi
/usr/sbin/sendmail -t < $MAILTMP
echo -e $CYAN "*** Sent email to $MAILTO"
tput sgr0
Loading