47 lines
947 B
Text
47 lines
947 B
Text
|
#!/bin/sh -x
|
||
|
|
||
|
# variables
|
||
|
CWD=$(pwd)
|
||
|
|
||
|
PRGNAM=$(basename $CWD)
|
||
|
VERSION=${VERSION:-$(date +"%Y.%m.%d_%H.%M")}
|
||
|
ARCH=noarch
|
||
|
BUILD=1
|
||
|
|
||
|
TAG=cyco
|
||
|
TMP=/tmp/$TAG
|
||
|
PKG=$TMP/pkg-$PRGNAM
|
||
|
OUTPUT=/tmp
|
||
|
|
||
|
PREFIX=/usr
|
||
|
|
||
|
# nettoyage préalable
|
||
|
rm -fr $PKG $TMP/$PRGNAM
|
||
|
|
||
|
mkdir -p $PKG$PREFIX/bin/
|
||
|
|
||
|
# mise en place
|
||
|
wget -c https://raw.github.com/wp-cli/builds/gh-pages/phar/wp-cli.phar -O $PKG$PREFIX/bin/wp-cli
|
||
|
|
||
|
chmod 0755 $PKG$PREFIX/bin/wp-cli
|
||
|
|
||
|
# embaumement
|
||
|
mkdir -p $PKG/install
|
||
|
cat <<EOF > $PKG/install/slack-desc
|
||
|
$PRGNAM: $PRGNAM (A command line interface for WordPress)
|
||
|
$PRGNAM:
|
||
|
$PRGNAM: WP-CLI is a set of command-line tools for managing WordPress installations.
|
||
|
$PRGNAM: You can update plugins, set up multisite installs and much more, without
|
||
|
$PRGNAM: using a web browser.
|
||
|
$PRGNAM:
|
||
|
$PRGNAM:
|
||
|
$PRGNAM:
|
||
|
$PRGNAM:
|
||
|
$PRGNAM: http://wp-cli.org/
|
||
|
$PRGNAM:
|
||
|
EOF
|
||
|
|
||
|
# empaquetage
|
||
|
cd $PKG
|
||
|
makepkg -l y -c n $OUTPUT/$PRGNAM-$(echo $VERSION | sed 's/-//g')-$ARCH-$BUILD$TAG.txz
|