summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames An2015-08-04 09:28:53 -0400
committerJames An2015-08-04 09:28:53 -0400
commit88e3ccae670e9740932779cbe69da8ad49330d6f (patch)
tree39dda465bb0e109c4ff867b6633441d967cd5874
parent7435ef44ae8ac3b4d3d220e1907c53e905098d15 (diff)
downloadaur-88e3ccae670e9740932779cbe69da8ad49330d6f.tar.gz
Added default drush.ini so drush is usable on install, updated to latest drush, and configured it for system-wide shared configuration.
-rw-r--r--.SRCINFO9
-rw-r--r--PKGBUILD40
-rw-r--r--drush-git.install7
-rw-r--r--drush.ini12
4 files changed, 59 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 416bd2e84169..47f4797af7f9 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,17 +1,20 @@
pkgbase = drush-git
pkgdesc = The Drupal command-line shell, git version.
- pkgver = 8.0.0.beta12.r1.g54f9394
- pkgrel = 1
+ pkgver = 8.0.0.beta12.r50.ge0f7248
+ pkgrel = 2
url = https://github.com/drush-ops/drush-git
+ install = drush-git.install
arch = any
license = GPL
makedepends = git
depends = bash
depends = php-composer
- provides = drush=8.0.0.beta12.r1.g54f9394
+ provides = drush=8.0.0.beta12.r50.ge0f7248
conflicts = drush
source = git://github.com/drush-ops/drush.git
+ source = drush.ini
md5sums = SKIP
+ md5sums = ef1a3b084642681c8a39d218284ce13d
pkgname = drush-git
diff --git a/PKGBUILD b/PKGBUILD
index dd340641c461..4112c23f7686 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -3,8 +3,8 @@
_pkgname=drush
pkgname=$_pkgname-git
-pkgver=8.0.0.beta12.r1.g54f9394
-pkgrel=1
+pkgver=8.0.0.beta12.r50.ge0f7248
+pkgrel=2
pkgdesc='The Drupal command-line shell, git version.'
arch=('any')
url="https://github.com/drush-ops/$pkgname"
@@ -13,8 +13,11 @@ depends=('bash' 'php-composer')
makedepends=('git')
provides=("$_pkgname=$pkgver")
conflicts=("$_pkgname")
-source=("git://github.com/drush-ops/$_pkgname.git")
-md5sums=('SKIP')
+install=$pkgname.install
+source=("git://github.com/drush-ops/$_pkgname.git"
+ "$_pkgname.ini")
+md5sums=('SKIP'
+ 'ef1a3b084642681c8a39d218284ce13d')
pkgver() {
cd "$_pkgname"
@@ -26,15 +29,40 @@ pkgver() {
}
prepare() {
- composer install --prefer-source --no-interaction --working-dir "$_pkgname"
+ composer update --prefer-source --no-interaction --working-dir "$_pkgname"
+ composer install --prefer-source --no-interaction --working-dir "$_pkgname"
+}
+
+check() {
+ cd "$_pkgname"
+
+ msg2 'Testing on Drupal 6'
+ UNISH_DRUPAL_MAJOR_VERSION=6 ./unish.sh
+ msg2 'Testing on Drupal 7'
+ UNISH_DRUPAL_MAJOR_VERSION=7 ./unish.sh
+ msg2 'Testing on Drupal 8'
+ UNISH_DRUPAL_MAJOR_VERSION=8 ./unish.sh
}
package() {
cd "$_pkgname"
- install -d "$pkgdir/usr/share/webapps/$_pkgname"
+ # Set up directory structure
+ install -d "$pkgdir/etc/bash_completion.d"
+ install -d "$pkgdir/etc/$_pkgname"
+ install -d "$pkgdir/etc/skel"
+ ln --force --symbolic "/etc/$_pkgname" "$pkgdir/etc/skel/.$_pkgname"
install -d "$pkgdir/usr/bin"
+ install -d "$pkgdir/usr/share/webapps/$_pkgname"
+ install -d "$pkgdir/usr/share/doc/$_pkgname/misc"
+ # Copy main application files
cp -rf * "$pkgdir/usr/share/webapps/$_pkgname"
+ # Move
+ cp -rf CONTRIBUTING.md README.md docs examples "$pkgdir/usr/share/doc/$_pkgname"
+ rm -rf "$pkgdir/usr/share/doc/$_pkgname/"{CONTRIBUTING.md,README.md,docs,examples,misc/windrush_build}
ln -s "/usr/share/webapps/$_pkgname/$_pkgname" "$pkgdir/usr/bin/$_pkgname"
+ ln -s "/usr/share/webapps/$_pkgname/$_pkgname.complete.sh" "$pkgdir/etc/bash_completion.d"
+
+ install -Dm644 "../$_pkgname.ini" "$pkgdir/etc/$_pkgname/$_pkgname.ini"
}
diff --git a/drush-git.install b/drush-git.install
new file mode 100644
index 000000000000..798a7a61f064
--- /dev/null
+++ b/drush-git.install
@@ -0,0 +1,7 @@
+post_install() {
+ echo '>>> Setting up shared system-wide drush configuration'
+ echo ' by symlinking ~/.drush to /etc/drush for all users.'
+ for user_dir in $(cut --fields=6 --delimiter=: /etc/passwd | grep ^/home); do
+ ln --force --symbolic /etc/drush "$user_dir"
+ done
+}
diff --git a/drush.ini b/drush.ini
new file mode 100644
index 000000000000..a7495eea0b80
--- /dev/null
+++ b/drush.ini
@@ -0,0 +1,12 @@
+;
+; Show all errors and direct them to stderr
+; when running drush.
+;
+error_reporting = E_ALL | E_NOTICE | E_STRICT
+display_errors = stderr
+
+;
+; Remove open_basedir restrictions.
+;
+open_basedir =
+date.timezone = UTC