export REPO=$(basename $(pwd) .git)
+if test $(uname) = "Linux"
+then
+ MKTEMP=mktemp
+else
+ MKTEMP="mktemp -t repo-template"
+fi
+
while test $# -gt 0
do
export "$1"
SRCFILE=$(dirname -- $0)/presets/$FILE
case $FILE in
.|..)
- echo $FILE
continue
;;
composer.json)
test "${COMPOSER+set}" = "" && continue
- SRCFILE=$(mktemp)
+ SRCFILE=$($MKTEMP)
php -d variables_order=E $(dirname -- $0)/presets/composer.json >$SRCFILE
;;
package.xml|CREDITS|config.*|Makefile.frag)
test "${PECL+set}" = "" && continue
- SRCFILE=$(mktemp)
+ SRCFILE=$($MKTEMP)
+ php -d variables_order=E $(dirname -- $0)/presets/$FILE >$SRCFILE
+ ;;
+ README.md|LICENSE)
+ SRCFILE=$($MKTEMP)
php -d variables_order=E $(dirname -- $0)/presets/$FILE >$SRCFILE
;;
- README.md)
- SRCFILE=$(mktemp)
- php -d variables_order=E $(dirname -- $0)/presets/README.md >$SRCFILE
+ mdref.mdref)
+ test "${MDREF+set}" = "" && continue
+ SRCFILE=$($MKTEMP)
+ php -d variables_order=E $(dirname -- $0)/presets/$FILE >$SRCFILE
+ FILE=$MDREF.mdref
;;
*)
;;
+<?php extract($_ENV) ?>
+<?php if (isset($MDREF)) : ?>
+Permission is hereby granted by the holder(s) of copyright or other legal
+privileges, author(s) or assembler(s), and contributor(s) of this work, to any
+person who obtains a copy of this work in any form, to reproduce, modify,
+distribute, publish, sell, sublicense, use, and/or otherwise deal in the
+licensed material without restriction, provided the following conditions are
+met:
+
+Redistributions, modified or unmodified, in whole or in part, must retain
+applicable copyright and other legal privilege notices, the above license
+notice, these conditions, and the following disclaimer.
+
+NO WARRANTY OF ANY KIND IS IMPLIED BY, OR SHOULD BE INFERRED FROM, THIS LICENSE
+OR THE ACT OF DISTRIBUTION UNDER THE TERMS OF THIS LICENSE, INCLUDING BUT NOT
+LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE,
+AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS, ASSEMBLERS, OR HOLDERS OF
+COPYRIGHT OR OTHER LEGAL PRIVILEGE BE LIABLE FOR ANY CLAIM, DAMAGES, OR OTHER
+LIABILITY, WHETHER IN ACTION OF CONTRACT, TORT, OR OTHERWISE ARISING FROM, OUT
+OF, OR IN CONNECTION WITH THE WORK OR THE USE OF OR OTHER DEALINGS IN THE WORK.
+<?php else : ?>
Copyright (c) 2015, Michael Wallner <mike@php.net>.
All rights reserved.
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+<?php endif ?>
<?php extract($_ENV); ?>
# <?=$REPO?>
+<?php if (isset($MDREF)) : ?>
+
+Sources for https://mdref.m6w6.name/<?=$MDREF?>
+
+<?php else : ?>
[![Build Status](https://travis-ci.org/m6w6/<?=$REPO?>.svg?branch=master)](https://travis-ci.org/m6w6/<?=$REPO?>)
...
## Documentation
+<?php endif; ?>
<?php if (isset($PECL)) : ?>
See the [online markdown reference](https://mdref.m6w6.name/<?=$PECL?>).
Known issues are listed in [BUGS](./BUGS) and future ideas can be found in [TODO](./TODO).
<?php endif; ?>
+<?php if (!isset($MDREF)) : ?>
## Installing
+<?php endif; ?>
<?php if (isset($COMPOSER)) : ?>
### Composer
## License
-<?=$REPO?> is licensed under the 2-Clause-BSD license, which can be found in
+<?=$REPO?> is licensed under the <?php if (isset($MDREF)) : ?>
+Open Works <?php else : ?>2-Clause-BSD <?php endif ?>
+license, which can be found in
the accompanying [LICENSE](./LICENSE) file.
## Contributing