X-Git-Url: http://git.plutz.net/?p=busy;a=blobdiff_plain;f=write%2Fprojectmeta.cgi;fp=write%2Fprojectmeta.cgi;h=0000000000000000000000000000000000000000;hp=c2ee4427ff718ab95327b463260b87518bf0aeca;hb=f485895094cd72318b46f39689c3ba954eb37411;hpb=904730d1782749bfac15b0344fe5782433f3099b diff --git a/write/projectmeta.cgi b/write/projectmeta.cgi deleted file mode 100755 index c2ee442..0000000 --- a/write/projectmeta.cgi +++ /dev/null @@ -1,57 +0,0 @@ -#!/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="../project.meta" - -[ "$HTTPS" = "on" ] && proto=https || proto=http -. ../auth/permissions.sh -$ACL_ADMIN || echo "Location: ${proto}://${HTTP_HOST}/?p=Error&i=noaccess\n\n" -$ACL_ADMIN || exit 0 - -if [ -n "${CONTENT_LENGTH}" -a "${CONTENT_LENGTH}" -gt 0 ]; then -(head -c "${CONTENT_LENGTH}"; echo)|sed 's/&/\n/g' \ - |sed -rn '/^((appName|appSlogan|svnRepo|gitRepo|flattrThingURL|paypalAddress|btcAddress|btcAdAddress)=.*|repoType=(svn|git)|(useFlattr|usePaypal|useBitcoin|btcAdGamble|btcAdErotic)=yes|advertise=(btcAd|no))$/{ - s:\+: :g;s:%:\\x:g;p}' \ - |while line="$(line)"; do - eval "$(echo -e "$line" |sed -r 's:[\n\r'\'']::g;s:^([a-zA-Z0-9_+-]+)=(.*)$:\1='"'\2'"':;')" - done -fi - -[ "$btcAdGamble" = yes -a "$btcAdErotic" = yes ] && btcAdContent=1 -[ "$btcAdGamble" != yes -a "$btcAdErotic" = yes ] && btcAdContent=2 -[ "$btcAdGamble" = yes -a "$btcAdErotic" != yes ] && btcAdContent=3 -[ "$btcAdGamble" != yes -a "$btcAdErotic" != yes ] && btcAdContent=4 - -echo "\ -name=$appName -slogan=$appSlogan -repoType=$repoType -svnRepo=$svnRepo -gitRepo=$gitRepo -useFlattr=$useFlattr -flattrThingURL=$flattrThingURL -usePaypal=$usePaypal -paypalAddress=$paypalAddress -useBitcoin=$useBitcoin -btcAddress=$btcAddress -advertise=$advertise -btcAdAddress=$btcAdAddress -btcAdContent=$btcAdContent -" >"$metafile" - -echo -n "Location: ${proto}://${HTTP_HOST}/?p=Admin\n\n"