#37 Split run.sh into build.sh and preview.sh
Merged 2 years ago by glb. Opened 2 years ago by glb.
glb/fedoramagazine-theme antora  into  master

file added
+27
@@ -0,0 +1,27 @@ 

+ #!/usr/bin/bash

+ # vim:set ts=3:

+ 

+ WPPLUGIN='yet-another-related-posts-plugin co-authors-plus'

+ 

+ set -e

+ 

+ if ! [[ -e mariadb ]]; then

+ 	mkdir mariadb

+ fi

+ 

+ if ! [[ -e opt ]]; then

+ 	mkdir opt

+ 	echo downloading opt/wp ...

+ 	curl -# -L --output-dir opt -o wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

+ 	chmod +x opt/wp

+ fi

+ 

+ if ! [[ -e srv ]]; then

+ 	mkdir srv

+ 	for plugin in $WPPLUGIN; do

+ 		echo downloading srv/$plugin.zip ...

+ 		curl -# -L --output-dir srv -O https://downloads.wordpress.org/plugin/$plugin.zip

+ 	done

+ fi

+ 

+ exit 0

preview.sh run.sh
file renamed
+5 -24
@@ -8,29 +8,8 @@ 

  USERNAME='wordpress'

  PASSWORD='chahL5oomaiHiezie8thei)h5'

  

- WPPLUGIN='yet-another-related-posts-plugin co-authors-plus'

- 

  set -e

  

- if ! [[ -e mariadb ]]; then

- 	mkdir mariadb

- fi

- 

- if ! [[ -e opt ]]; then

- 	mkdir opt

- 	echo downloading opt/wp ...

- 	curl -# -L --output-dir opt -o wp https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar

- 	chmod +x opt/wp

- fi

- 

- if ! [[ -e srv ]]; then

- 	mkdir srv

- 	for plugin in $WPPLUGIN; do

- 		echo downloading srv/$plugin.zip ...

- 		curl -# -L --output-dir srv -O https://downloads.wordpress.org/plugin/$plugin.zip

- 	done

- fi

- 

  function wordpress_stop {

  	echo

  	podman pod stop $PODMANNS
@@ -86,11 +65,13 @@ 

  	$WP theme activate fedoramagazine

  fi

  

- for plugin in $WPPLUGIN; do

- 	if ! $WP plugin is-installed $plugin; then

- 		$WP plugin install /srv/$plugin.zip --activate

+ cd srv

+ for plugin in *.zip; do

+ 	if ! $WP plugin is-installed ${plugin%.zip}; then

+ 		$WP plugin install /srv/$plugin --activate

  	fi

  done

+ cd ..

  

  echo "wordpress is listening on http://localhost:$HOSTPORT/; press ctrl-c to stop"

  sleep infinity

no initial comment

Pull-Request has been merged by glb

2 years ago
Metadata