diff --git a/build/build.plugin.zsh b/build/build.plugin.zsh index 2688f7d..5a1510b 100644 --- a/build/build.plugin.zsh +++ b/build/build.plugin.zsh @@ -33,7 +33,7 @@ build-dir() { python $_build_dir_py $file; local error=$? # If the file exists, read the build directory from it, then delete it. - [ -f $file ] && build_dir=$PWD/`cat $file`; rm $file + [ -f $file ] && local build_dir=$PWD/`cat $file`; rm $file # If choosing a build directory failed, return that error. [[ "$error" = "0" ]] || return $error # If `build.ninja` exists in alias `ninja`, return. @@ -59,14 +59,14 @@ build-dir() { [[ "$1" = "--build" ]] && eval $build || true } -# Build then run a target residing in `$build_dir/bin`. +# Build then run a target residing in `~build/bin`. build-run() { local target=$1; shift 1 - build $target && $build_dir/bin/$target $* + eval build $target && ~build/bin/$target $* } -# Build then debug a target residing in `$build_dir/bin`. +# Build then debug a target residing in `~build/bin`. build-debug() { local target=$1; shift 1 - build $target && debug $build_dir/bin/$target $* + eval build $target && debug ~build/bin/$target $* }