Compare commits
1 Commits
3c0f62d4d8
...
b12dcfe243
Author | SHA1 | Date | |
---|---|---|---|
b12dcfe243 |
@ -21,7 +21,7 @@ fi
|
|||||||
# function because it will result in `pwd` not this scripts directory.
|
# function because it will result in `pwd` not this scripts directory.
|
||||||
_build_dir_py=${0:a:h}/build-dir.py
|
_build_dir_py=${0:a:h}/build-dir.py
|
||||||
|
|
||||||
# Prompt user to interactively choose a build directory for `build` to build.
|
# Interactively choose a `~build` directory for `build` to build.
|
||||||
# TODO: Support arguments:
|
# TODO: Support arguments:
|
||||||
# * [x] [-h,--help] - show this help message and exit
|
# * [x] [-h,--help] - show this help message and exit
|
||||||
# * [x] [--build] - execute the build commend
|
# * [x] [--build] - execute the build commend
|
||||||
@ -52,8 +52,9 @@ build-dir() {
|
|||||||
echo "could not determine build command"
|
echo "could not determine build command"
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
# Redefine the new alias.
|
# Redefine the `build` alias and update the `~build` hash directory.
|
||||||
alias build="$build"
|
alias build="$build"
|
||||||
|
hash -d build=$build_dir
|
||||||
# If `--build` is specified then evaluate the command.
|
# If `--build` is specified then evaluate the command.
|
||||||
[[ "$1" = "--build" ]] && eval $build || true
|
[[ "$1" = "--build" ]] && eval $build || true
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user