7 "--batch") batchmode
=yes ;;
10 # Return on STDOUT the files that don't seem to have the needed copyright
11 # notice, or that have a copyright notice that looks suspicious.
12 copyright_notices
() {
13 find .
-name '*.el' -print0 |
14 xargs -0 grep -L 'Free Software Foundation, Inc' |
15 grep -v '.-\(pkg\|autoloads\)\.el$'
17 find .
-name '*.el' -print |
19 sed -n -e '/[Cc]opyright.*, *[1-9][-0-9]*,\?$/N' \
20 -e '/Free Software Foundation/d' \
21 -e "s|^\\(.*[Cc]opyright\\)|$(echo $f | tr '|' '_'):\\1|p" "$f"
25 # Send an email to warn about a problem.
26 # Takes the body on STDIN and the subject as argument.
29 if [ "no" = "$batchmode" ]; then
33 set -- $
(host -t mx gnu.org
);
35 (sleep 5; echo "HELO elpa.gnu.org"
36 sleep 1; echo "MAIL FROM: <elpa@elpa.gnu.org>"
37 sleep 1; echo "RCPT TO: <emacs-elpa-diffs@gnu.org>"
40 From: ELPA update <elpa@elpa.gnu.org>
41 To: emacs-elpa-diffs@gnu.org
46 echo ".") |
telnet "$mx_gnu_org" smtp
51 base
="copyright_exceptions"
52 (cd packages
; copyright_notices
) >"$base.new"
53 if [ -r "$base.old" ] &&
54 ! diff "$base.old" "$base.new" >/dev
/null
;
56 diff -u "$base.old" "$base.new" |
57 signal_error
"Copyright notices changed"
60 mv "$base.new" "$base.old"
66 (cd ~elpa
/elpa
; bzr up
)
70 rm -rf archive
# In case there's one left over!
71 make archive-full
>make.log
2>&1 ||
{
72 signal_error
"make archive-full failed" <make.log
76 tar zcf emacs-packages-latest.tgz packages
)
78 # Not sure why we have `staging-old', but let's keep it for now.
80 cp -a staging staging-old
81 # Move new files into place but don't throw out old package versions.
82 mv build
/archive
/packages
/* staging
/packages
/
83 mv build
/archive
/* staging
/ 2>/dev
/null
86 # "make archive-full" already does fetch the daily org build.
87 #admin/org-synch.sh ~elpa/staging/packages ~elpa/build/admin