3 # Copyright 2012 Paul Hänsch
4 # This file is part of Busy
6 # Busy is free software: you can redistribute it and/or modify
7 # it under the terms of the GNU Affero General Public License as published by
8 # the Free Software Foundation, either version 3 of the License, or
9 # (at your option) any later version.
11 # Busy is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 # GNU Affero General Public License for more details.
16 # You should have received a copy of the GNU Affero General Public License
17 # along with Busy. If not, see <http://www.gnu.org/licenses/>.
19 metafile="../project.meta"
21 [ "$HTTPS" = "on" ] && proto=https || proto=http
22 . ../auth/permissions.sh
23 $ACL_ADMIN || echo "Location: ${proto}://${HTTP_HOST}/?p=Error&i=noaccess\n\n"
26 if [ -n "${CONTENT_LENGTH}" -a "${CONTENT_LENGTH}" -gt 0 ]; then
27 (head -c "${CONTENT_LENGTH}"; echo)|sed 's/&/\n/g' \
28 |sed -rn '/^((appName|appSlogan|svnRepo|gitRepo|flattrThingURL|paypalAddress|btcAddress)=.*|repoType=(svn|git)|(useFlattr|usePaypal|useBitcoin)=yes)$/{
29 s:\+: :g;s:%:\\x:g;s:^([a-zA-Z0-9_+-]+)=(.*)$:\1='"'\2'"':;p}' \
30 |while line="$(line)"; do
31 eval "$(echo -e "$line" |tr -d '\n\r')"
42 flattrThingURL=$flattrThingURL
44 paypalAddress=$paypalAddress
45 useBitcoin=$useBitcoin
46 btcAddress=$btcAddress
49 echo -n "Location: ${proto}://${HTTP_HOST}/?p=Admin\n\n"