<pre>
Path to the script from the application root directory.
</pre>

<code>string script = 3;</code>
349386
public com.google.protobuf.ByteString
      getScriptBytes() {
    java.lang.Object ref = script_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b = 
          com.google.protobuf.ByteString.copyFromUtf8(
              (java.lang.String) ref);
      script_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }
1271627
public java.lang.String getScript() {
    java.lang.Object ref = script_;
    if (ref instanceof java.lang.String) {
      return (java.lang.String) ref;
    } else {
      com.google.protobuf.ByteString bs = 
          (com.google.protobuf.ByteString) ref;
      java.lang.String s = bs.toStringUtf8();
      script_ = s;
      return s;
    }
  }
1147414
public Script addScript(String name, String script) throws Exception {
        int id = -1;
        PreparedStatement statement = null;
        ResultSet results = null;

        try (Connection sqlConnection = SQLService.getInstance().getConnection()) {
            statement = sqlConnection.prepareStatement(
                "INSERT INTO " + Constants.DB_TABLE_SCRIPT
                    + "(" + Constants.SCRIPT_NAME + "," + Constants.SCRIPT_SCRIPT + "," + Constants.SCRIPT_TYPE + ")"
                    + " VALUES (?, ?, ?)", PreparedStatement.RETURN_GENERATED_KEYS
            );
            statement.setString(1, name);
            statement.setString(2, script);
            statement.setInt(3, 0);
            statement.executeUpdate();

            // execute statement and get resultSet which will have the generated path ID as the first field
            results = statement.getGeneratedKeys();

            if (results.next()) {
                id = results.getInt(1);
            } else {
                // something went wrong
                throw new Exception("Could not add script");
            }
        } catch (SQLException e) {
            throw e;
        } finally {
            try {
                if (results != null) {
                    results.close();
                }
            } catch (Exception e) {
            }
            try {
                if (statement != null) {
                    statement.close();
                }
            } catch (Exception e) {
            }
        }

        return this.getScript(id);
    }
634650
function() {
    var i, jsDir, jsPath, scripts = _document.getElementsByTagName("script");
    for (i = scripts.length; i--; ) {
      if (!(jsPath = scripts[i].src)) {
        jsDir = null;
        break;
      }
      jsPath = _getDirPathOfUrl(jsPath);
      if (jsDir == null) {
        jsDir = jsPath;
      } else if (jsDir !== jsPath) {
        jsDir = null;
        break;
      }
    }
    return jsDir || undefined;
  }
1017384
private void executeGalaxyScript(final String scriptName) {
    final String bashScript = String.format("cd %s; if [ -d .venv ]; then . .venv/bin/activate; fi; %s", getPath(), scriptName);
    IoUtils.executeAndWait("bash", "-c", bashScript);
  }
887503
public static String generateScript(Script script, Map<String, Object> parameterValues) {
    StringWriter stringWriter = new StringWriter();
    try {
      Template template =
          new Template(null, new StringReader(script.getContent()), new Configuration(VERSION));
      template.process(parameterValues, stringWriter);
    } catch (TemplateException | IOException e) {
      throw new GenerateScriptException(
          "Error processing parameters for script [" + script.getName() + "]. " + e.getMessage());
    }
    return stringWriter.toString();
  }
813831
public Mapping getScriptMapping() {
	if (scriptMapping == null) {
	    // Physical resource TODO make in RAM
	    Resource physical = getConfigDir().getRealResource("jsr223");
	    if (!physical.exists()) physical.mkdirs();

	    this.scriptMapping = new MappingImpl(this, "/mapping-script/", physical.getAbsolutePath(), null, ConfigImpl.INSPECT_NEVER, true, true, true, true, false, true, null,
		    -1, -1);
	}
	return scriptMapping;
    }
1078866
protected void executeScript(String scriptPath) {
        URL scriptUrl = null;
        try {
            if (scriptPath.startsWith("classpath:")) {
                String script = scriptPath.substring("classpath:".length());
                scriptUrl = ClassUtil.getResource(script);
                if (scriptUrl == null) {
                    log.warn("Script '{}' not found!", scriptPath);
                }
            } else {
                File file = new File(scriptPath);
                if (file.exists()) {
                    scriptUrl = file.toURI().toURL();
                } else {
                    log.warn("Script '{}' not found!", scriptPath);
                }
            }

            // execute the script
            if (scriptUrl != null) {
                executeScript(scriptUrl);
            }

        } catch (Exception e) {
            log.error("Failed to parse '{}' as a url", scriptPath);
        }
    }
1725
public function getDocumentRootPath()
    {
        /**
         * The absolute pathname of the currently executing script.
         * Notatka: If a script is executed with the CLI, as a relative path, such as file.php or ../file.php,
         * $_SERVER['SCRIPT_FILENAME'] will contain the relative path specified by the user.
         */
        if (isset($_SERVER['SCRIPT_FILENAME'])) {
            $sRealPath = dirname($_SERVER['SCRIPT_FILENAME']);
        }
        else {
            /**
             * realpath — Returns canonicalized absolute pathname
             */
            $sRealPath = realpath('.') ;
        }

        $sRealPath = $this->trimPathTrailingSlashes($sRealPath);

        /**
         * The filename of the currently executing script, relative to the document root.
         * For instance, $_SERVER['PHP_SELF'] in a script at the address http://example.com/test.php/foo.bar
         * would be /test.php/foo.bar.
         */
        $sSelfPath = dirname($_SERVER['PHP_SELF']);
        $sSelfPath = $this->trimPathTrailingSlashes($sSelfPath);

        return $this->trimPathTrailingSlashes(substr($sRealPath, 0, strlen($sRealPath) - strlen($sSelfPath)));
    }
1142621
function getModulePath(filePath, fileName) {
    if (isJavaScript(fileName)) {
        fileName = fileName.substring(0, fileName.length - 3);
    }

    return filePath + '/' + fileName;
}
973247
protected String getJavaExecutablePath() {
        String executableName = isWindows() ? "bin/java.exe" : "bin/java";
        return PROPERTIES.getJavaHome().resolve(executableName).toAbsolutePath().toString();
    }
1254213
@GET
    @Path("{dbName}/scripts")
    public List<ScriptInfo> scripts(@PathParam("dbName") String dbName) {
        Migration migration = locator.getService(Migration.class, dbName);
        if (migration == null)
            throw new NotFoundException();
        return migration.allScript();
    }
1016398
protected static String getExtension(String scriptName)
    {
        if (scriptName == null)
        {
            return null;
        }

        int filePosition = scriptName.lastIndexOf("/");
        String fileName;

        if (scriptName.lastIndexOf("\\") > filePosition)
        {
            filePosition = scriptName.lastIndexOf("\\");
        }

        if (filePosition >= 0)
        {
            fileName = scriptName.substring(filePosition + 1);
        }
        else
        {
            fileName = scriptName;
        }

        final int extensionPosition = fileName.lastIndexOf(".");
        if (extensionPosition >= 0)
        {
            return fileName.substring(extensionPosition + 1);
        }

        return null;
    }
954823
function getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptPath, ignoreCase) {
                // Make all paths absolute/normalized if they are not already
                rootDirs = ts.map(rootDirs, function (rootDirectory) { return ts.normalizePath(ts.isRootedDiskPath(rootDirectory) ? rootDirectory : ts.combinePaths(basePath, rootDirectory)); });
                // Determine the path to the directory containing the script relative to the root directory it is contained within
                var relativeDirectory;
                for (var _i = 0, rootDirs_1 = rootDirs; _i < rootDirs_1.length; _i++) {
                    var rootDirectory = rootDirs_1[_i];
                    if (ts.containsPath(rootDirectory, scriptPath, basePath, ignoreCase)) {
                        relativeDirectory = scriptPath.substr(rootDirectory.length);
                        break;
                    }
                }
                // Now find a path for each potential directory that is to be merged with the one containing the script
                return ts.deduplicate(ts.map(rootDirs, function (rootDirectory) { return ts.combinePaths(rootDirectory, relativeDirectory); }));
            }
275387
@Override
	public URI locateModuleResource(String mid, boolean isJavaScript) {
		Location location = null;
		String remainder = null;

		// Now see if mid matches exactly a path
		if (getPaths().containsKey(mid)) {
			location = getPaths().get(mid);
		}
		// If the module is a package name, then resolve to the packag main id
		if (location == null && getPackages().containsKey(mid)) {
			mid = getPackages().get(mid).getMain();
		}
		if (location == null) {
			// Still no match.  Iterate through the paths and packages looking
			// for an entry that matches part of the module id
			String prefix = ""; //$NON-NLS-1$
			for (Map.Entry<String, Location> entry : getPaths().entrySet()) {
				if (mid.startsWith(entry.getKey()) && entry.getKey().length() > prefix.length()) {
					if (entry.getKey().endsWith("/") || mid.charAt(entry.getKey().length()) == '/') { //$NON-NLS-1$
						prefix = entry.getKey();
						location = entry.getValue();
					}
				}
			}
			for (Map.Entry<String, IPackage> entry : getPackages().entrySet()) {
				if (mid.startsWith(entry.getKey()) && entry.getKey().length() > prefix.length()) {
					if (entry.getKey().endsWith("/") || mid.charAt(entry.getKey().length()) == '/') { //$NON-NLS-1$
						prefix = entry.getKey();
						location = entry.getValue().getLocation();
					}
				}
			}
			if (prefix.length() > 0) {
				// We found a partial match.  Set the remainder
				remainder = mid.substring(prefix.length());
				if (remainder.startsWith("/")) { //$NON-NLS-1$
					remainder = remainder.substring(1);
				}
				// Check for illegal relative path. Throws exception if an
				// attempt is made to use relitive path components to go
				// outside the path defined by the entry.
				PathUtil.normalizePaths(prefix, new String[]{remainder});
			} else {
				// Check for illegal relative path. Throws exception if an
				// attempt is made to use relitive path components to go
				// outside the path defined by the base url.
				PathUtil.normalizePaths("", new String[]{mid});  //$NON-NLS-1$
				// not match.  Return a URI relative to the config base URI
				Location base = getBase();
				location = new Location(
						base.getPrimary().resolve(mid),
						base.getOverride() == null ? null : base.getOverride().resolve(mid)
						);
			}
		}
		URI result = null;
		try {
			URI override = toResourceUri(location.getOverride(), remainder, isJavaScript);
			result = (override != null && aggregator.newResource(override).exists()) ?
					override : toResourceUri(location.getPrimary(), remainder, isJavaScript);

		} catch (URISyntaxException e) {
			if (log.isLoggable(Level.WARNING)) {
				log.log(Level.WARNING, e.getMessage(), e);
			}
		}

		return result;
	}
547937
public Path getOutputDirectory()
    {
        File file = getOptionValue(OutputPathOption.NAME);
        return file == null ? null : file.toPath();
    }
577006
private Object getScriptResult(String script, ScriptEngine engine) throws ScriptException {
        String scriptToExecute = script.substring(script.indexOf(":") + 1);
        return engine.eval(scriptToExecute);
    }