Sponsored Content
Top Forums Shell Programming and Scripting Include libexec directory for script when run Post 302868327 by KevinSjoberg on Sunday 27th of October 2013 07:01:36 AM
Old 10-27-2013
Include libexec directory for script when run

Hi everyone!

This is my first post, so bear with me.

I have this script, vpm, which make use of the libexec directory for commands intended to be run by the bin/vpm binary. I want to add the libexec directory to $PATH when running the vpm binary. I don't want the script itself to try figure out where the path is, so I want to specify the path during installation.

Currently the binary have this line export PATH="%VPM_LIBEXECDIR%:$PATH". When I install the script I just replace "%VPM_LIBEXECDIR%" with the actual path.

This works, but it's problematic when I develop locally because then I just want to run the script directly by going to the directory and run ./bin/vpm.

How does people usually solve this problem?
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

include all files under a directory

I want to include all the subnet files under /etc/dhcpd/ to /etc/dhcpd.conf so here is my content of dhcpd.conf ... include "/etc/dhcpd/*"; however, the check-syntax reports syntax error, as they do not recognize the wildcard *, and display that " file /etc/dhcpd/* could not be found. ... (4 Replies)
Discussion started by: fredao
4 Replies

2. Shell Programming and Scripting

Run script from the directory it is in

I have a script at /java/custom/build.sh I want to force the user to execute the script from the /java/custom directory ONLY. In other words if the user is in /java I want to exit if they execute custom/build.sh The directory structure may change from the env to env, so I can't use... (4 Replies)
Discussion started by: t_c_1980
4 Replies

3. Shell Programming and Scripting

How to make a script to run everytime a new file is copied into a directory??

Hi folks I have a unix script script1 in a directory folder1 and also I have few input log files in this directory. My input log files will be copied into this directory folder1 from the portable thumb drive. Now what I want is I need to run this script1 whenever any new file is copied... (2 Replies)
Discussion started by: ks_reddy
2 Replies

4. Shell Programming and Scripting

script that reads all the scripts in the directory and run them within that script

Hi I am trying to write a shell script that is reading all the scripts in the current directory (currently 5) and is allowing me to run the scripts that is in the directory. I want that this scripts asks te user to execute 1 of the listed scripts. I have 4 sample scripts in the directory:... (8 Replies)
Discussion started by: I-1
8 Replies

5. UNIX for Dummies Questions & Answers

How do I run a .bin file in another directory in a script?

The way this works from the command prompt is: ___________________________________________ cd /data/local/bin chmod 0755 file.bin ./file.bin _______________________________________________ How do I make this happen in a script. The file must be run in its directory but I can not get the... (2 Replies)
Discussion started by: chrstdvd
2 Replies

6. Shell Programming and Scripting

Shell script to run all the python scripts from particular directory

I have N number of python scripts which i am receiving from REST web server and i am saving them in /home/mandar/ . Now i want to write a script to run all the python scripts from this directory and monitor them every minute...if any process is dead or hung it should be restarted by this script. ... (0 Replies)
Discussion started by: Mandar Nandale
0 Replies

7. Shell Programming and Scripting

How to run the Shell Script from external directory using java?

Hi, I have created a Shell Script and invoke through java using Process Builder It's working fine, if (Shell script file ) in the same directory as java file. By Problem: How to run the Shell Script file( resides in external directory) using java. What configuration i have... (1 Reply)
Discussion started by: nanthagopal
1 Replies

8. Programming

Run ruby test and include require

I want to run a test for the gem mini_magick: https://github.com/minimagick/minimagick I got the directory lib, inside of which i got: - mini_magick.rb - mini_gmagick.rb and inside of the test folder is the test i need to run: - image_test.rb and a helper file called: - test_helper.rb ... (1 Reply)
Discussion started by: tornow
1 Replies

9. Shell Programming and Scripting

Find Command Include Sub Directory

This script writes the output files to FILES but I don't want to exclude all directories from ABC_CHQ and LYS_ADV, I want to include one sub directory name process which is under ABC_CHQ and LYS_ADV in the search. Right now its excluding everything from prune directories such as ABC_CHQ, LYS_ADV... (10 Replies)
Discussion started by: John William
10 Replies

10. Shell Programming and Scripting

How to run a script/command on all the directories in a directory tree?

How to run a script/command on all the directories in a directory tree? The below script is just for the files in a single directory, how to run it on all the directories in a directory tree? #!/bin/sh for audio_files in *.mp3 do outfile="${audio_files%.*}.aiff" sox "$audio_files"... (2 Replies)
Discussion started by: temp-usr
2 Replies
java_home(1)						      General Commands Manual						      java_home(1)

NAME
java_home - return a value for $JAVA_HOME SYNOPSIS
/usr/libexec/java_home [options] DESCRIPTION
The java_home command returns a path suitable for setting the JAVA_HOME environment variable. It determines this path from the user's enabled and preferred JVMs in the Java Preferences application. Additional constraints may be provided to filter the list of JVMs avail- able. By default, if no constraints match the available list of JVMs, the default order is used. The path is printed to standard output. OPTIONS
-v or --version version Filters the returned JVMs by the major platform version in "JVMVersion" form. Example versions: "1.5+", or "1.6*". -a or --arch architecture Filters the returned JVMs by the architecture they support. Example architectures: "i386", "x86_64", or "ppc". -d or --datamodel datamodel Filters the returned JVMs capable of running in 32 or 64-bit mode. Supported datamodels: "-d32" and "-d64". Specifying a datamodel is synonymous with specifying a particular architecture. -t or --task task Selects from the list of JVMs which can run a specific task. The order of each of these lists is set by the Java Preferences appli- cation. Supported tasks: "Applets", "WebStart", "BundledApp", "JNI" and "CommandLine". The default task is "CommandLine". -F or --failfast Immediately fails when filters return no JVMs; does not print out the path to the default $JAVA_HOME. --exec command ... Executes the command at $JAVA_HOME/bin/<command> and passes the remaining arguments. Any arguments to select which $JAVA_HOME to use must precede the --exec option. -X or --xml Prints the list of selected JVMs and associated properties as an XML plist to stdout. -V or --verbose Prints the matching list of JVMs and architectures to stderr. -h or --help Brief usage information. USAGE
/usr/libexec/java_home helps users set a $JAVA_HOME in their login rc files, or provides a way for command-line Java tools to use the most appropriate JVM which can satisfy a minimum version or architecture requirement. The --exec argument can invoke tools in the selected $JAVA_HOME/bin directory, which is useful for starting Java command-line tools from launchd plists without hardcoding the full path to the Java command-line tool. Usage for bash-style shells: $ export JAVA_HOME=`/usr/libexec/java_home` Usage for csh-style shells: % setenv JAVA_HOME `/usr/libexec/java_home` 04 August 2010 java_home(1)
All times are GMT -4. The time now is 04:12 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy