2010-05-02 20:24:01 +00:00
|
|
|
#!/bin/sh
|
|
|
|
#
|
|
|
|
# 2010 Nico Schottelius (nico-nsbin at schottelius.org)
|
|
|
|
#
|
|
|
|
# This file is part of nsbin.
|
|
|
|
#
|
|
|
|
# nsbin 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.
|
|
|
|
#
|
|
|
|
# nsbin 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 nsbin. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
#
|
2010-08-19 16:58:36 +00:00
|
|
|
# Submit solution according to http://edu.panter.ch/FormelleBedingungenUebungenBetriebssysteme
|
2010-05-02 20:24:01 +00:00
|
|
|
#
|
|
|
|
|
2010-08-19 16:58:36 +00:00
|
|
|
if [ $# -ne 2 ]; then
|
|
|
|
cat << eof
|
|
|
|
$0: <subject> <srcdir>
|
2010-05-02 20:31:38 +00:00
|
|
|
|
2010-08-19 16:58:36 +00:00
|
|
|
eof
|
|
|
|
exit 1
|
|
|
|
fi
|
2010-05-02 20:24:01 +00:00
|
|
|
|
|
|
|
|
2010-08-19 16:58:36 +00:00
|
|
|
subject_suff="$1"; shift
|
|
|
|
input="$1"; shift
|
2010-05-02 20:24:01 +00:00
|
|
|
|
2010-08-19 16:58:36 +00:00
|
|
|
self="nschotte"
|
|
|
|
to="bseelige"
|
|
|
|
domain="@hsz-t.ch"
|
|
|
|
self_q="${self}${domain}"
|
|
|
|
to_q="${to}${domain}"
|
|
|
|
subject_pref="[Betriebssysteme]"
|
|
|
|
|
|
|
|
|
|
|
|
sendmail="/usr/sbin/sendmail"
|
|
|
|
to_all="${to_q} ${self_q}"
|
|
|
|
to_all="${to_q}"
|
|
|
|
|
|
|
|
|
|
|
|
(
|
|
|
|
(
|
|
|
|
cat << eof
|
|
|
|
To: $to_all
|
|
|
|
Subject: $subject_pref $subject_suff
|
|
|
|
From: $self_q
|
|
|
|
|
|
|
|
eof
|
|
|
|
|
|
|
|
)
|
|
|
|
tar c "${input}" | gzip -9 | uuencode "${subject_suff}.tar.gz"
|
|
|
|
) | $sendmail -f "$self_q" $to_all
|