This repository was archived by the owner on Apr 17, 2024. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11#! /usr/bin/env bash
22
3+ COMPOSER_BIN_DIR=" $( composer config bin-dir) "
4+ DOCROOT=" web"
5+
36# Setup Anonymous User Function
47# Gives access to anonymous user to access protected resources.
58# This function receives one argument:
@@ -12,14 +15,14 @@ setup_anonymous_user() {
1215
1316 # Setup local variables
1417 current_path=` pwd`
15- drush =$1 /bin /drush
16- drupal_base =$1 /web
18+ DRUSH =$1 /$COMPOSER_BIN_DIR /drush
19+ DRUPAL_BASE =$1 /$DOCROOT
1720
18- cd $drupal_base
21+ cd $DRUPAL_BASE
1922 # Add Permission to anonymous user
20- $drush role-add-perm ' anonymous' ' access jsonapi resource list' -y
21- $drush updatedb -y
22- $drush cr -y
23+ $DRUSH role-add-perm ' anonymous' ' access jsonapi resource list' -y
24+ $DRUSH updatedb -y
25+ $DRUSH cr -y
2326
2427 cd $current_path
2528}
@@ -40,13 +43,13 @@ run_functional_tests() {
4043 fi
4144
4245 current_path=` pwd`
43- CONTENTA_PATH=$1 /web /profiles/contrib/contenta_jsonapi/
44- PHPUNIT=$1 /bin /phpunit
46+ CONTENTA_PATH=$1 /$DOCROOT /profiles/contrib/contenta_jsonapi/
47+ PHPUNIT=$1 /$COMPOSER_BIN_DIR /phpunit
4548
4649 cd $CONTENTA_PATH
4750
4851 WEB_HOST=$WEB_HOST WEB_PORT=$WEB_PORT $PHPUNIT --testsuite ContentaFunctional
4952 exit $?
5053}
5154
52- $@
55+ $@
Original file line number Diff line number Diff line change 33BASE_DIR=" $( dirname $( dirname $( cd ${0%/* } && pwd) ) ) "
44
55COMPOSER=" $( which composer) "
6+ COMPOSER_BIN_DIR=" $( composer config bin-dir) "
67DOCROOT=" web"
78
89# Define the color scheme.
2122 echo -e " ${FG_C}${WBG_C} WARNING ${NO_C} No installation path provided.\nContenta will be installed in $DEST_DIR ."
2223 echo -e " ${FG_C}${BG_C} USAGE ${NO_C} ${0} [install_path] # to install in a different directory."
2324fi
24- DRUSH=" $DEST_DIR /vendor/bin /drush"
25+ DRUSH=" $DEST_DIR /$COMPOSER_BIN_DIR /drush"
2526
2627echo -e " \n\n\n"
2728echo -e " \t********************************"
You can’t perform that action at this time.
0 commit comments