X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=tools%2Fmake-functions;h=62f33115d596a8bf0d48f6e3d0ce023163b52ea7;hb=c6cada8c3f0284ee5d1b0b00631c92dbd782e717;hp=9a3a13f474c4b6cc73816e55f68b2867ccd50fb4;hpb=0d909a4a5ecadcb6808a31fd7c9a8187c3de804a;p=people%2Fteissler%2Fipfire-2.x.git diff --git a/tools/make-functions b/tools/make-functions index 9a3a13f47..62f33115d 100644 --- a/tools/make-functions +++ b/tools/make-functions @@ -1,9 +1,28 @@ #!/bin/bash -############################################################################ +############################################################################### +# # +# IPFire.org - A linux based firewall # +# Copyright (C) 2007 Michael Tremer & Christian Schmidt # +# # +# This program is free software: you can redistribute it and/or modify # +# it under the terms of the GNU General Public License as published by # +# the Free Software Foundation, either version 3 of the License, or # +# (at your option) any later version. # +# # +# This program is distributed in the hope that it will be useful, # +# but WITHOUT ANY WARRANTY; without even the implied warranty of # +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # +# GNU General Public License for more details. # +# # +# You should have received a copy of the GNU General Public License # +# along with this program. If not, see . # +# # +############################################################################### +############################################################################### # # Beautifying variables & presentation & input output interface # -############################################################################ +############################################################################### ## Screen Dimentions # Find current screen size @@ -479,7 +498,7 @@ batch_script() { fi echo "### RUNNING BUILD" - $0 build --devel + $0 build #--devel evaluate 1 mail_me ERROR echo "### UPLOADING ISO" @@ -502,12 +521,12 @@ watch_screen() { } mail_me() { - chmod 755 tools/sendEmail - ATTACHMENT=/tmp/ipfire-build-logs-R$SVN_REVISION.tar.gz + echo "From: $MAIL_FROM" > /tmp/ipfire_mail_body.$$ + echo "To: $MAIL_TO" >> /tmp/ipfire_mail_body.$$ case "$1" in success) - SUBJECT="SUCCESS: IPFIRE-BUILD R$SVN_REVISION on `hostname`" - cat < /tmp/ipfire_mail_body + cat <> /tmp/ipfire_mail_body.$$ +Subject: SUCCESS: IPFIRE-BUILD R$SVN_REVISION on `hostname` Building IPFire on `hostname` in Revision $SVN_REVISION was successfull! You can find the ISO on your ftp server if you told the script where it is. @@ -523,8 +542,8 @@ END echo -ne "${BOLD}***Sending success message${NORMAL}" ;; *) - SUBJECT="ERROR $1: IPFIRE-BUILD R$SVN_REVISION on `hostname`" - cat < /tmp/ipfire_mail_body + cat <> /tmp/ipfire_mail_body.$$ +Subject: ERROR $1: IPFIRE-BUILD R$SVN_REVISION on `hostname` When I was building IPFire on `hostname`, I have found an ERROR with name $1! Here you can see the logs and detect the reason for this error. @@ -540,22 +559,15 @@ END echo -ne "${BOLD}***Sending error message${NORMAL}" ;; esac - tar cfz $ATTACHMENT log/_build* - cat /tmp/ipfire_mail_body | tools/sendEmail -q \ - -f $MAIL_USER \ - -t $MAIL_TO \ - -u $SUBJECT \ - -s $MAIL_SERVER:25 \ - -xu $MAIL_USER \ - -xp $MAIL_PASS \ - -l log/_build.mail.log \ - -a $ATTACHMENT # -v + +sleep 15 + python tools/sendEmail < /tmp/ipfire_mail_body.$$ if [ "$?" -eq "0" ]; then beautify message DONE else beautify message FAIL fi - rm -f /tmp/ipfire_mail_body $ATTACHMENT + rm -f /tmp/ipfire_mail_body.$$ } make_config() { @@ -626,6 +638,8 @@ make_config() { echo -ne "You should enter a mail server to login...\n" echo -ne "Please type the url: " read MAIL_SERVER + echo -ne "Please type where the email is from: " + read MAIL_FROM echo -ne "Please type the username: " read MAIL_USER echo -ne "Please type the password (hidden): " @@ -646,6 +660,7 @@ FTP_CACHE_USER=$FTP_CACHE_USER FTP_CACHE_PASS=$FTP_CACHE_PASS ### mail reports MAIL_TO="$MAIL_TO" +MAIL_FROM=$MAIL_FROM MAIL_SERVER=$MAIL_SERVER MAIL_USER=$MAIL_USER MAIL_PASS=$MAIL_PASS @@ -709,25 +724,3 @@ update_langs() { $BASEDIR/tools/check_langs.sh > $BASEDIR/doc/language_missings beautify message DONE } - -sign_packages() { - if gpg --list-key 64D96617 ; then - if [ -d "$BASEDIR/packages" ]; then - cd $BASEDIR/packages - for i in `ls $BASEDIR/packages`; do - echo -n "Signing $i" - echo $GPG_PASSPHRASE | gpg --sign --armor -u 64D96617 --passphrase-fd 0 $i - if [ "$?" -eq "0" ]; then - beautify message DONE - mv -f $i.asc $i - else - beautify message FAIL - fi - done - cd - - fi - else - echo -n "You don't have the secret key to sign ipfire's packages!" - beautify message FAIL - fi -}