X-Git-Url: http://git.plutz.net/?p=busy;a=blobdiff_plain;f=actions%2Fprojectmeta.sh;fp=actions%2Fprojectmeta.sh;h=ac7e454247aefda03f555a033991c464f681aafe;hp=0000000000000000000000000000000000000000;hb=f485895094cd72318b46f39689c3ba954eb37411;hpb=904730d1782749bfac15b0344fe5782433f3099b diff --git a/actions/projectmeta.sh b/actions/projectmeta.sh new file mode 100755 index 0000000..ac7e454 --- /dev/null +++ b/actions/projectmeta.sh @@ -0,0 +1,48 @@ +#!/bin/zsh + +# Copyright 2012 Paul Hänsch +# This file is part of Busy +# +# Busy is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# Busy 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 Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with Busy. If not, see . + +metafile="$_DATA/project.meta" + +$ACL_ADMIN || echo "Location: //${HTTP_HOST}/?p=Error&i=noaccess\n\n" +$ACL_ADMIN || exit 0 + +cgi_post + +[ "$_POST[\"btcAdGamble\"]" = yes -a "$_POST[\"btcAdErotic\"]" = yes ] && btcAdContent=1 +[ "$_POST[\"btcAdGamble\"]" != yes -a "$_POST[\"btcAdErotic\"]" = yes ] && btcAdContent=2 +[ "$_POST[\"btcAdGamble\"]" = yes -a "$_POST[\"btcAdErotic\"]" != yes ] && btcAdContent=3 +[ "$_POST[\"btcAdGamble\"]" != yes -a "$_POST[\"btcAdErotic\"]" != yes ] && btcAdContent=4 + +echo -E "\ +name=$_POST[\"appName\"] +slogan=$_POST[\"appSlogan\"] +repoType=$(echo -E "$_POST[\"repoType\"]" |grep -Ex 'svn|git') +svnRepo=$_POST[\"svnRepo\"] +gitRepo=$_POST[\"gitRepo\"] +useFlattr=$(echo -E "$_POST[\"useFlattr\"]" |grep -Ex 'yes') +flattrThingURL=$_POST[\"flattrThingURL\"] +usePaypal=$(echo -E "$_POST[\"usePaypal\"]" |grep -Ex 'yes') +paypalAddress=$_POST[\"paypalAddress\"] +useBitcoin=$(echo -E "$_POST[\"useBitcoin\"]" |grep -Ex 'yes') +btcAddress=$_POST[\"btcAddress\"] +advertise=$(echo -E "$_POST[\"advertise\"]" |grep -Ex 'btcAd|no') +btcAdAddress=$_POST[\"btcAdAddress\"] +btcAdContent=$btcAdContent +" >"$metafile" + +echo -n "Location: ${HTTP_REFERER}\n\n"