Welcome to mirror list, hosted at ThFree Co, Russian Federation.

updateConfig.sh - github.com/nextcloud/nextcloud-config-converter.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 15402c103be10fcd3abf8d9decaf323913cf2012 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/sh

currentDir=$(pwd)

if [[ -d /tmp/owncloud-documentation ]]
then
	rm -rf /tmp/owncloud-documentation
fi

# fetch documentation repo
git clone -q git@github.com:owncloud/documentation.git /tmp/owncloud-documentation
cd /tmp/owncloud-documentation

for branch in stable7 master
do
	git checkout -q $branch
	cd $currentDir

	if [[ $branch == 'master' ]]; then
		branch=stable8
	fi

	# download current version of config.sample.php
	curl -sS -o /tmp/config.sample.php https://raw.githubusercontent.com/owncloud/core/$branch/config/config.sample.php

	if [[ $branch == 'stable8' ]]; then
		# use that to generate the documentation
		php convert.php --input-file=/tmp/config.sample.php --output-file=/tmp/owncloud-documentation/admin_manual/configuration_server/config_sample_php_parameters.rst
	else
		# use that to generate the documentation
		php convert.php --input-file=/tmp/config.sample.php --output-file=/tmp/owncloud-documentation/admin_manual/configuration/config_sample_php_parameters.rst
	fi

	cd /tmp/owncloud-documentation
	# invokes an output if something has changed
	git status -s

	git commit --allow-empty -qam 'generate documentation from config.sample.php'

	# cleanup
	rm -rf /tmp/config.sample.php
done