Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Commit

Permalink
Add phpcs & setup Drupal sniff file (#24)
Browse files Browse the repository at this point in the history
* Add phpcs & setup Drupal sniff file
* Resolves Islandora/documentation#563

* oof.

* Actually get it to work for ubuntu user
  • Loading branch information
ruebot authored and dannylamb committed Mar 29, 2017
1 parent 54cb966 commit 7381e74
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
config.vm.provision :shell, :path => "./scripts/lamp-server.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/fits.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/solr.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/composer.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/composer.sh", :args => home_dir, :privileged =>false
config.vm.provision :shell, :path => "./scripts/drupal.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/fcrepo.sh", :args => home_dir
config.vm.provision :shell, :path => "./scripts/blazegraph.sh", :args => home_dir
Expand Down
17 changes: 16 additions & 1 deletion scripts/composer.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
#!/bin/bash
echo "Installing Composer"

HOME_DIR=$1

if [ -f "$HOME_DIR/islandora/configs/variables" ]; then
. "$HOME_DIR"/islandora/configs/variables
fi

cd /tmp
curl -sS https://getcomposer.org/installer | php
php composer.phar install --no-progress
mv composer.phar /usr/local/bin/composer
sudo mv composer.phar /usr/local/bin/composer

echo "Installing phpcs"
cd $HOME
composer global require drupal/coder
composer global update drupal/coder --prefer-source
export PATH="$PATH:$HOME/.config/composer/vendor/bin"
echo 'export PATH="$PATH:$HOME/.config/composer/vendor/bin"' >> .bashrc
phpcs --config-set installed_paths $HOME/.config/composer/vendor/drupal/coder/coder_sniffer
2 changes: 1 addition & 1 deletion scripts/fits.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ if [ ! -f "$DOWNLOAD_DIR/fits-$FITS_WS_VERSION.war" ]; then
wget -q -O "$DOWNLOAD_DIR/fits-$FITS_WS_VERSION.war" "http://projects.iq.harvard.edu/files/fits/files/fits-$FITS_WS_VERSION.war"
fi

unzip "$DOWNLOAD_DIR/fits-$FITS_VERSION.zip" -d /opt
unzip -q "$DOWNLOAD_DIR/fits-$FITS_VERSION.zip" -d /opt
mv /opt/fits-$FITS_VERSION /opt/fits
chown tomcat8:tomcat8 /opt/fits

Expand Down

0 comments on commit 7381e74

Please sign in to comment.