#!/bin/sh # https://codex.wordpress.org/WordPress.org_API WP=`curl -s https://api.wordpress.org/core/version-check/1.7/ |jq -r '.offers[0].version'` WP_CLI=`curl -s https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar |sha256sum |awk '{ print $1 }'` echo -n "$WP:$WP_CLI" for theme in `cat themes` do VERSION=`curl -s "https://api.wordpress.org/themes/info/1.1/?action=theme_information&request\[slug\]=$theme" |jq -r '.version'` echo -n :$theme-$VERSION done for plugin in `cat plugins` do VERSION=`curl -s "https://api.wordpress.org/plugins/info/1.0/$plugin.json" |jq -r '.version'` echo -n :$plugin-$VERSION done