File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66require_once $ projectRoot . '/vendor/autoload.php ' ;
77
88// Symlink module into ssp vendor lib so that templates and urls can resolve correctly
9- $ linkPath = $ projectRoot . '/vendor/simplesamlphp/simplesamlphp/modules/oidc ' ;
10- if (false === file_exists ($ linkPath )) {
11- echo "Linking ' $ linkPath' to ' $ projectRoot' \n" ;
12- symlink ($ projectRoot , $ linkPath );
13- } else {
14- echo "' $ linkPath' linked to ' $ projectRoot' \n" ;
9+ $ modulesDir = $ projectRoot . '/vendor/simplesamlphp/simplesamlphp/modules ' ;
10+ $ linkPath = $ modulesDir . '/oidc ' ;
11+ $ target = '../../../../ ' ;
12+
13+ if (!is_dir ($ modulesDir )) {
14+ mkdir ($ modulesDir , 0777 , true );
15+ }
16+
17+ if (is_link ($ linkPath )) {
18+ if (!file_exists ($ linkPath ) || (readlink ($ linkPath ) !== $ target && realpath ($ linkPath ) !== $ projectRoot )) {
19+ unlink ($ linkPath );
20+ symlink ($ target , $ linkPath );
21+ echo "Re-linking ' $ linkPath' to ' $ target' \n" ;
22+ } else {
23+ echo "' $ linkPath' linked to ' $ projectRoot' \n" ;
24+ }
25+ } elseif (!file_exists ($ linkPath )) {
26+ echo "Linking ' $ linkPath' to ' $ target' \n" ;
27+ symlink ($ target , $ linkPath );
1528}
You can’t perform that action at this time.
0 commit comments