Compare commits
1 Commits
d0d03198c9
...
3c0f62d4d8
Author | SHA1 | Date | |
---|---|---|---|
3c0f62d4d8 |
@ -16,7 +16,7 @@ from pick import Picker
|
||||
|
||||
|
||||
def main():
|
||||
"""Main entry point to build_dir command."""
|
||||
"""Main entry point to build-dir.py script."""
|
||||
parser = ArgumentParser()
|
||||
parser.add_argument('output')
|
||||
parser.add_argument('--default', action='store_true')
|
||||
|
@ -47,16 +47,15 @@ build-dir() {
|
||||
local build="make -j $cpu_count -C $build_dir"
|
||||
fi
|
||||
# If the build variable is not defined the command could not be determined.
|
||||
echo "$build"
|
||||
if [ -z $build ]; then
|
||||
# TODO: Prompt user to choose a build command?
|
||||
echo "could not determine build command"
|
||||
return 1
|
||||
fi
|
||||
# Define the new alias.
|
||||
# Redefine the new alias.
|
||||
alias build="$build"
|
||||
# If `--build` is specified then evaluate the command.
|
||||
[[ "$1" = "--build" ]] && eval $build
|
||||
[[ "$1" = "--build" ]] && eval $build || true
|
||||
}
|
||||
|
||||
# Build then run a target residing in `$build_dir/bin`.
|
||||
|
Loading…
x
Reference in New Issue
Block a user