summarylogtreecommitdiffstats
path: root/drush-git.install
diff options
context:
space:
mode:
authorJames An2015-08-08 12:41:39 -0400
committerJames An2015-08-08 12:41:39 -0400
commit0a8a512913252191e40307c3a2f67874d0515e7a (patch)
tree666d03c8d764d6dfeab3f9fe6dacaf40ae34dd55 /drush-git.install
parentf87a220626caa16f9c1392b412fdeb7b88f19099 (diff)
downloadaur-0a8a512913252191e40307c3a2f67874d0515e7a.tar.gz
Upgrade upstream version, organised drush files to system-wide /etc/drush path, and added PHP .ini include files to enable zero-conf functionality with an unmodified PHP config setup.
Diffstat (limited to 'drush-git.install')
-rw-r--r--drush-git.install12
1 files changed, 10 insertions, 2 deletions
diff --git a/drush-git.install b/drush-git.install
index 798a7a61f064..9de9447e1608 100644
--- a/drush-git.install
+++ b/drush-git.install
@@ -1,7 +1,15 @@
post_install() {
+ post_upgrade
+}
+
+post_upgrade() {
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"
+ for user in $(cut --fields=1,6 --delimiter=: /etc/passwd | grep :/home); do
+ user=($(echo $user | tr ':' ' '))
+ path="${user[1]}/.drush"
+ user="${user[0]}"
+ [ -h "$path" -a "$(realpath "$path")" = /etc/drush ] ||
+ sudo -Hu $user ln --backup --force --symbolic /etc/drush "$path"
done
}