mirror of https://github.com/jenv/jenv.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
410 B
20 lines
410 B
#!/usr/bin/env bash |
|
# Usage: jenv options-file-read <file> |
|
set -e |
|
[ -n "$JENV_DEBUG" ] && set -x |
|
|
|
OPTIONS_FILE="$1" |
|
|
|
if [ -e "$OPTIONS_FILE" ]; then |
|
# Read the first non-whitespace word from the specified options file. |
|
# Be careful not to load it whole in case there's something crazy in it. |
|
options=$(head -n 1 $OPTIONS_FILE) |
|
|
|
|
|
if [ -n "$options" ]; then |
|
echo "$options" |
|
exit |
|
fi |
|
fi |
|
|
|
exit 1
|
|
|